WriteException() public static method

Writes the exception to standard error and sends it to the remote Exceptionless server, according to the settings.
public static WriteException ( string niceDescription, Exception e, object data, bool sendException = true ) : void
niceDescription string The description printed to the console if debug mode is turned off.
e Exception The exception that was thrown.
data object Any extra data that needs to be sent to the remote Exceptionless server.
sendException bool Whether to send the exception to Exceptionless, if enabled.
return void
Example #1
0
 private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) => ExceptionOut.WriteException("[AppDomainUnhandledException]" + e.ExceptionObject.GetType().FullName, (Exception)e.ExceptionObject, null, true);
Example #2
0
 private static void TaskScheduler_UnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs e) => ExceptionOut.WriteException("[UnobservedTaskException]" + e.Exception.InnerExceptions[0].GetType().FullName, e.Exception.InnerExceptions[0], null, true);
Example #3
0
 private static void GraphQL_UnhandledException(UnhandledExceptionContext e) => ExceptionOut.WriteException("[GraphQLUnhandledException]" + e.OriginalException.GetType().FullName, e.OriginalException, null, true);