urho icon indicating copy to clipboard operation
urho copied to clipboard

"You can omit this exception" in unhandled exceptions

Open deakjahn opened this issue 6 years ago • 2 comments

You shouldn't add the "You can omit this exception" text in Runtime.OnNativeCallback(). Move it to Urho.Application.ThrowUnhandledException() and only add it to the error message if UnhandledException is null. If the user did subscribe to this event, there is no need to inform them that they can subscribe to it. They already know. :-)

deakjahn avatar Nov 25 '18 15:11 deakjahn

I interpret that message to mean to provide this handler:

static void Application_UnhandledException(object sender, UnhandledExceptionEventArgs e)
        {
            e.Handled = true;
        }

and this linkage:

Application.UnhandledException += Application_UnhandledException;

utekai avatar Feb 02 '19 21:02 utekai

Right now, this message will also appear when the user has already provided this handler. This is why I suggested the changes ("only add it to the error message if UnhandledException is null").

deakjahn avatar Feb 07 '19 19:02 deakjahn