Class ErrorReportForm
Presents the user with a friendly interface in case of an error, offering to report it to the developers.
Namespace: NanoByte.Common.Controls
Assembly: NanoByte.Common.WinForms.dll
Syntax
public sealed class ErrorReportForm : Form
Remarks
This class should only be used by System.Windows.Forms applications.
Methods
Dispose(Boolean)
Clean up any resources being used.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
Boolean | disposing | true if managed resources should be disposed; otherwise, false. |
Report(Exception, Uri)
Displays the error reporting form.
Declaration
public static void Report(Exception ex, Uri uploadUri)
Parameters
Type | Name | Description |
---|---|---|
Exception | ex | The exception to report. |
Uri | uploadUri | The URI to upload error reports to. |
Remarks
Modal to all windows on the current thread. Creates a new message loop if none exists.
SetupMonitoring(Uri)
Sets up hooks that catch and report any unhandled exceptions. Calling this more than once has no effect.
Declaration
public static void SetupMonitoring(Uri uploadUri)
Parameters
Type | Name | Description |
---|---|---|
Uri | uploadUri | The URI to upload error reports to. |
Remarks
If an exception is caught any remaining threads will continue to execute until the error has been reported. Then the entire process will be terminated.