C# Class _3PA.MainFeatures.ErrorHandler

Show file Open project: jcaillon/3P

Public Methods

Method Description
LogError ( Exception e, string message = null ) : bool

Log a piece of information returns false if the error already occured during the session, true otherwise

ShowErrors ( Exception e, string message = null ) : void

Shows an error to the user

ShowErrors ( Exception e, string message, string fileName ) : void

Shows a Messagebox informing the user that something went wrong with a file, renames said file with the suffix "_errors"

ThreadErrorHandler ( object sender, ThreadExceptionEventArgs e ) : void
UnhandledErrorHandler ( object sender, UnhandledExceptionEventArgs e ) : void
UnobservedErrorHandler ( object sender, System.Threading.Tasks.UnobservedTaskExceptionEventArgs e ) : void

Private Methods

Method Description
GetExceptionInfo ( Exception e ) : ExceptionInfo

Returns info on an exception

SendBugReport ( ExceptionInfo bugReport ) : void

Sends the given report to the web service of 3P

Method Details

LogError() public static method

Log a piece of information returns false if the error already occured during the session, true otherwise
public static LogError ( Exception e, string message = null ) : bool
e System.Exception
message string
return bool

ShowErrors() public static method

Shows an error to the user
public static ShowErrors ( Exception e, string message = null ) : void
e System.Exception
message string
return void

ShowErrors() public static method

Shows a Messagebox informing the user that something went wrong with a file, renames said file with the suffix "_errors"
public static ShowErrors ( Exception e, string message, string fileName ) : void
e System.Exception
message string
fileName string
return void

ThreadErrorHandler() public static method

public static ThreadErrorHandler ( object sender, ThreadExceptionEventArgs e ) : void
sender object
e System.Threading.ThreadExceptionEventArgs
return void

UnhandledErrorHandler() public static method

public static UnhandledErrorHandler ( object sender, UnhandledExceptionEventArgs e ) : void
sender object
e System.UnhandledExceptionEventArgs
return void

UnobservedErrorHandler() public static method

public static UnobservedErrorHandler ( object sender, System.Threading.Tasks.UnobservedTaskExceptionEventArgs e ) : void
sender object
e System.Threading.Tasks.UnobservedTaskExceptionEventArgs
return void