urho
urho copied to clipboard
"You can omit this exception" in unhandled exceptions
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. :-)
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;
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").