A question about mixing On Error and Throw

  • Thread starter Thread starter Oenone
  • Start date Start date
O

Oenone

I have a piece of code (which I can't change) that uses On Error for its
error handling. It calls into a piece of code in another assembly that
Throws an exception.

Is there any way in my On Error error handler to determine the stack trace
between where the code is executing and where the exception was thrown? Or
even just the name of the class and procedure in which the exception was
thrown?

As far as I can see there's no way to determine this (there are no
properties of the Err object that tell me, and I don't have an Exception
object to query), is there some clever alternative that I've missed?

Thanks,
 
Oenone said:
Is there any way in my On Error error handler to determine the stack trace
between where the code is executing and where the exception was thrown?

Found it now -- the Err object now has a GetException property that returns
the thrown Exception object.
 
Back
Top