Hi,
I'm using NetAdvantage for Winform 12.1 for .NET 4, and now I'm working with UltraToolbarManager.
Our team designed our application to handle all handled exception at AppDomain.UnhandledException Handler, to deal with error log at one location.
So use Application.SetUnhandledExceptionMode and handle all exceptions like following code;
AppDomain.CurrentDomain.UnhandledException += (sender, args) => { var ex = args.ExceptionObject as Exception; MessageBox.Show("Nice Catch in Unhandled Exception!\n" + ex.Message); }; Application.SetUnhandledExceptionMode(UnhandledExceptionMode.ThrowException);
Everything goes fine, except UltraToolbarManager...
When click menus, it's OK. Unhandled Exception occurs.However, if I click toolbar button, ThreadException occurs and ,that's all. No UnhandledException fired.
Is it design ? Are there any ways to change this behavior ?
Hello Hiroshi,
I am still following your thread. Did my suggestions helped you to solve your issue ? If not please do not hesitate to contact us if you still have any other questions related with this matter.
Hi, Chipilev
Sorry for my late reply.
I attached sample application to this post.It's windowsform application set unhandleExceptionMode = ThrowException (see Program.cs)
By this option, Every exception which isn't caught in application code will be handled at AppDomain.UnhandledException.So when you click button(which always throws exception), the exception is handled at UnhandledException, and application is terminated.And when you click menu (which always throws exception similarly), you can see same behavior.
But, when you click toolbar (which use same tools in menu), the behavior is difference. Exception is handled at Application.ThreadException.
Is it a right behavior ?