OnExceptionThrown

Called when an application exception is thrown in the user interface. Generally used to pass additional or different information to the Exago logfile.

Signature     

For custom code the args array is structured as follows:

args[] is contains two objects, the System.Exception, and the WebReports.Api.Common.Logger (which provides write access to the Exago logfile).

For .Net Assemblies the method signature is as follows:

bool EventHandlerName(SessionInfo sessionInfo, Exception exception, Logger logger)

Expected Return

The event expects a boolean return value, which if true, will not continue logging the error.

Example

var exception = args[0] as System.Exception;
var logger = args[1] as WebReports.Api.Common.Logger;
logger.Error(String.Format("User Id: {0}", sessionInfo.SetupData.Parameters.UserId), exception);
return true;  // means not to continue logging (since we already did)