How can we help you today? How can we help you today?

Check during runtime, if SA Error Handling is attached

Hi,

we use smart assemblx error reporting for an application, but not for all configurations of software. E.g. for DEV environment we have no error handling attached (means AttachApp() is not called).
Is there a way to check thi state during runime. Like "SmartAssembly.GetErrorReportingAttached() or similar ?

Thanks a lot.
BR
J.D.
drewello
0

Comments

2 comments

  • Jessica R
    Hi and thanks for your post!

    There isn't a built-in method to check if error reporting is enabled, but when you enable error reporting, a namespace is added to your assembly called SmartAssembly.SmartExceptionsCore. What you can do at runtime is check if that namespace exists in the executing assembly. Does that sound like it may help?
    Jessica R
    0
  • drewello
    Hi, thanks, that sounds good! Meanwhile we implemented another solution where we use an own flag that we set when AttachApp() is called. So I thinks as this works we will not change now.

    BR J.D.
    drewello
    0

Add comment

Please sign in to leave a comment.