C# Class SIL.Utils.ErrorReporter

Summary description for ErrorReporter.
Inheritance: System.Windows.Forms.Form, IFWDisposable
Mostra file Open project: sillsdev/FieldWorks Class Usage Examples

Protected Properties

Property Type Description
s_emailSubject string
s_isOkToInteractWithUser bool

Public Methods

Method Description
AddProperty ( string label, string contents ) : void

add a property that he would like included in any bug reports created by this application.

CheckDisposed ( ) : void

Check to see if the object has been disposed. All public Properties and Methods should call this before doing anything else.

ReportException ( Exception error, RegistryKey applicationKey, string emailAddress ) : bool

show a dialog or output to the error log, as appropriate.

ReportException ( Exception error, RegistryKey applicationKey, string emailAddress, Form parent, bool isLethal ) : bool

show a dialog or output to the error log, as appropriate.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Executes in two distinct scenarios. 1. If disposing is true, the method has been called directly or indirectly by a user's code via the Dispose method. Both managed and unmanaged resources can be disposed. 2. If disposing is false, the method has been called by the runtime from inside the finalizer and you should not reference (access) other managed objects, as they already have been garbage collected. Only unmanaged resources can be disposed.

If any exceptions are thrown, that is fine. If the method is being done in a finalizer, it will be ignored. If it is thrown by client code calling Dispose, it needs to be handled by fixing the bug. If subclasses override this method, they should call the base implementation.

ErrorReporter ( bool isLethal, string emailAddress, bool fReportDuplicateGuidsASAP = false, string errorText = "" ) : System

this is protected so that we can have a Singleton

GatherData ( ) : string

OnKeyDown ( KeyEventArgs e ) : void

Shows the attempt to continue label if the shift key is pressed

OnKeyUp ( KeyEventArgs e ) : void

Hides the attempt to continue label if the shift key is pressed

OnShown ( EventArgs e ) : void

Private Methods

Method Description
FillInDetailsTextBox ( Exception error ) : void
InitializeComponent ( ) : void
MakeSuggestion ( RegistryKey applicationKey, string emailAddress, Form parent ) : void
ModelessClosed ( object sender, EventArgs e ) : void
OnPaint ( PaintEventArgs e ) : void
ReportDuplicateGuids ( RegistryKey applicationKey, string emailAddress, Form parent, string errorText ) : void
ReportProblem ( RegistryKey applicationKey, string emailAddress, Form parent ) : void
SetDialogStringsForDuplicateGUIDsError ( ) : void
SetDialogStringsSoLocatilizationWorks ( ) : void
ShowDetails ( bool show ) : void
ShowDialog ( RegistryKey applicationKey, Exception error, Form parent ) : void

Shows the dialog (handles the error, if it is one).

UpdateAppRuntime ( RegistryKey applicationKey ) : void
UpdateCrashCount ( RegistryKey applicationKey, string sPropName ) : void
btnClose_Click ( object sender, System e ) : void

cancelButton_Click ( object sender, EventArgs e ) : void
gdk_atom_intern ( string atomName, bool onlyIfExists ) : IntPtr
gtk_clipboard_get ( IntPtr atom ) : IntPtr
gtk_clipboard_set_text ( IntPtr clipboard, [ text, int len ) : void
gtk_clipboard_store ( IntPtr clipboard ) : void
m_reproduce_TextChanged ( object sender, EventArgs e ) : void
viewDetailsLink_LinkClicked ( object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e ) : void

Method Details

AddProperty() public static method

add a property that he would like included in any bug reports created by this application.
public static AddProperty ( string label, string contents ) : void
label string
contents string
return void

CheckDisposed() public method

Check to see if the object has been disposed. All public Properties and Methods should call this before doing anything else.
public CheckDisposed ( ) : void
return void

Dispose() protected method

Executes in two distinct scenarios. 1. If disposing is true, the method has been called directly or indirectly by a user's code via the Dispose method. Both managed and unmanaged resources can be disposed. 2. If disposing is false, the method has been called by the runtime from inside the finalizer and you should not reference (access) other managed objects, as they already have been garbage collected. Only unmanaged resources can be disposed.
If any exceptions are thrown, that is fine. If the method is being done in a finalizer, it will be ignored. If it is thrown by client code calling Dispose, it needs to be handled by fixing the bug. If subclasses override this method, they should call the base implementation.
protected Dispose ( bool disposing ) : void
disposing bool
return void

ErrorReporter() protected method

this is protected so that we can have a Singleton
protected ErrorReporter ( bool isLethal, string emailAddress, bool fReportDuplicateGuidsASAP = false, string errorText = "" ) : System
isLethal bool
emailAddress string
fReportDuplicateGuidsASAP bool
errorText string
return System

GatherData() protected method

protected GatherData ( ) : string
return string

OnKeyDown() protected method

Shows the attempt to continue label if the shift key is pressed
protected OnKeyDown ( KeyEventArgs e ) : void
e System.Windows.Forms.KeyEventArgs
return void

OnKeyUp() protected method

Hides the attempt to continue label if the shift key is pressed
protected OnKeyUp ( KeyEventArgs e ) : void
e System.Windows.Forms.KeyEventArgs
return void

OnShown() protected method

protected OnShown ( EventArgs e ) : void
e System.EventArgs
return void

ReportException() public static method

show a dialog or output to the error log, as appropriate.
public static ReportException ( Exception error, RegistryKey applicationKey, string emailAddress ) : bool
error System.Exception the exception you want to report
applicationKey Microsoft.Win32.RegistryKey The application registry key.
emailAddress string The e-mail address for reporting errors.
return bool

ReportException() public static method

show a dialog or output to the error log, as appropriate.
public static ReportException ( Exception error, RegistryKey applicationKey, string emailAddress, Form parent, bool isLethal ) : bool
error System.Exception the exception you want to report
applicationKey Microsoft.Win32.RegistryKey The application registry key.
emailAddress string The e-mail address for reporting errors.
parent System.Windows.Forms.Form the parent form that this error belongs to (i.e. the form /// show modally on)
isLethal bool set to true if the error is lethal, otherwise /// false.
return bool

Property Details

s_emailSubject protected_oe static_oe property

The subject for error report emails
protected static string s_emailSubject
return string

s_isOkToInteractWithUser protected_oe static_oe property

protected static bool s_isOkToInteractWithUser
return bool