Global Event: OnExceptionThrown
OnExceptionThrown is called when an application exception is thrown in the user interface. Generally used to pass additional or different information to the log file. For more information, see Accessing the Log File.
Signature
For custom code, the args[]
array is structured as follows:
- the
System.Exception
object - the
WebReports.Api.Common.Logger
object — provides write access to the log file - string of JSON data with the AJAX arguments which can provide more information in the log regarding the users requests which resulted in the exception being thrown.
For .NET Assemblies the method signature is as follows:
bool EventHandlerName(SessionInfo sessionInfo, Exception exception, Logger logger, string jsonArgs)
Expected Return
The OnExceptionThrown event expects a Boolean return value. When true, logging of the exception is stopped.