Check during runtime, if SA Error Handling is attached

drewellodrewello Posts: 3
edited January 2, 2017 3:36AM in SmartAssembly
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.

Comments

  • Jessica RJessica R Posts: 1,319 Rose Gold 4
    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 Ramos | Product Support Engineer | Redgate Software

    Have you visited our Help Center?


  • 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.
Sign In or Register to comment.