Options

Error creating custom UnhandledExceptionHandler

doobopdoobop Posts: 9
edited November 12, 2014 7:24AM in SmartAssembly
Hi,

I am trying to create a custom WPF error reporting dialog and UnhandledExcpetionHandler. For my UnhandledExceptionHandler, I have
public class SmartAssemblyReportingExceptionHandler : UnhandledExceptionHandler
    {
        protected override void OnReportException(ReportExceptionEventArgs e) {}
        protected override void OnFatalException(FatalExceptionEventArgs e) {}
        protected override void OnSecurityException(SecurityExceptionEventArgs e) {}

        public static bool AttachApp()
        {
            try
            {
                AttachExceptionHandler(new SmartAssemblyReportingExceptionHandler());
                return true;
            }
            catch (SecurityException)
            {
                return false;
            }
        }
    }
When I try to executre "AttachApp()", I get an error message - String was not recognized as a valid Boolean.
This is with SmartAssembly 6.9.

redgateException.PNG
Sign In or Register to comment.