Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Static method: void RunMain(Action, Action<Exception>, Action<Exception>)

  • Declared in: RT.Util.Ut

Declaration

public static void RunMain(
    Action main,
    Action<Exception> onUnhandledMain,
    Action<Exception> onUnhandledThread = null
)

Summary

Execute the core of the application. In debug mode, exceptions are passed through untouched. In release mode, all exceptions are caught, including those on other threads, and passed on to the specified handlers. Also, the main thread is given the name "Main".

Parameters

Actionmain A method which executes the core of the application.
Action<Exception>onUnhandledMain Method called in case the main method throws an unhandled exception.
Action<Exception>onUnhandledThread Method called in case a thread other than the one executing the main method throws an unhandled exception. If null, onUnhandledMain will be called instead.