How can I identify the location that an error occurred when the ApplicationMgr.ReportError event is raised?
I have a C# operator interface based on the "Creating a Basic User Interface" example. Sometimes my ApplicationMgr.ReportError event handler gets called, and I display a MessageBox with the error details as follows (where "this" is my MainForm):
MessageBox.Show(
this,
ErrorMessage.AppendCodeAndDescription(axApplicationMgr, e.errorMessage, e.errorCode),
"Error",
MessageBoxButtons.OK,
MessageBoxIcon.Stop);
The particular case I'm seeing is:
Unknown variable or property name 'Step'.
Error accessing item 'Step'.
Unknown variable or property name. [Error Code: -17306]
There are a lot of places in my sequence file where I reference a 'Step' property, so I'd like to narrow down the location of the problem. The error only occurs on occasion and is difficult for me to reproduce. If I try to force a similar error by referencing a non-existent property, then I get the standard runtime error dialog instead of my C# event handler. How do I troubleshoot this? Is there any way I can get access to the source of the problem from the ReportError event?