Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1940
unhandled exception in specific event
posted

Hello,

first of all: this post is about UltraTree in some way, so keep reading ;)

I came across a strange behavior I am really worried about. I can not find any hints what is causing this. Here is the problem:

In our application we handle unhandled exceptions in a specific way, log the stack trace etc with the following subscriptions to the event handlers:

Application.ThreadException += this.ThreadExceptionFunction;
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
AppDomain.CurrentDomain.UnhandledException += this.UnhandledExceptionFunction;

now if I throw a new exception anyway those event handlers are called and everywhere works fine, except for one specific place:

Throwing a new exception in an event handler for BeforeNodeUpdate from UltraTree will not cause the events to fire, so that we can not log anything etc...

why? Please help me! :)

 

Blue

Parents
  • 20872
    Verified Answer
    Offline posted

    Hello Blue,

    After further research it seems that this behavior is by design. The reason you are not hitting the

    UnhandledException handler is that there are no UnhandledExceptions occurring. The exception in this case is being handled. The UltraTree handles any exceptions that occur while committing the value to the data source, in case the data source throws an exception and fires the DataError event. The WinGrid does the same thing.

    If you have any other questions please feel free to let us know.

Reply Children