Global Event: OnExceptionThrown

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


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.


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)

Hidden Article Information

Article Author
Exago Development
created 2017-02-21 16:10:27 UTC
updated 2017-06-27 14:46:52 UTC

Server Events, event handlers, list of server events, error, error details, logfile, logging, message, thrown, exceptionthrown, throw, exception,
Have more questions? Submit a request