KS.Reactor.ksExceptionHandler Class Reference

Exception handlers. More...

Public Member Functions

delegate void ExceptionHandler (string message, Exception ex)
 Exception handler. More...
 

Static Public Member Functions

static void Handle (string message, Exception ex)
 Handle an exception by invoking the OnException event. More...
 

Static Public Attributes

static bool RethrowExceptions = false
 By default don't rethrow exceptions in Unity More...
 

Events

static ExceptionHandler OnException
 Invoked when a exception is caught in developer code. More...
 

Detailed Description

Exception handlers.

Member Function Documentation

◆ ExceptionHandler()

delegate void KS.Reactor.ksExceptionHandler.ExceptionHandler ( string  message,
Exception  ex 
)

Exception handler.

Parameters
messageMessage.
exException.

◆ Handle()

static void KS.Reactor.ksExceptionHandler.Handle ( string  message,
Exception  ex 
)
static

Handle an exception by invoking the OnException event.

Logs the exception if no event handlers are registered. Marks the exception as handled by adding a KSReactor object to the exception data if rethrowing is enabled.

Parameters
messageMessage.
exExceptions.

Member Data Documentation

◆ RethrowExceptions

bool KS.Reactor.ksExceptionHandler.RethrowExceptions = false
static

By default don't rethrow exceptions in Unity

Event Documentation

◆ OnException

ExceptionHandler KS.Reactor.ksExceptionHandler.OnException
static

Invoked when a exception is caught in developer code.