SmartAssembly 6

Setting up error reporting

You can modify your software so that it automatically intercepts unhandled exceptions and reports detailed information back to you.

You can also use error reporting to report information about handled exceptions. For more information, see Reporting handled exceptions.

To enable error reporting:

  1. To report exceptions, in the Project Settings window, go to Automated Error Reporting or click the icon in the toolbar:
  2. Select I want errors reported in my application.
  3. Choose the template to use.
  4. Complete the Application name, Company name and Project name.
  5. If you want your application to continue after an exception, select Always continue.
  6. Decide whether to select Improve performance.

    Improving the performance reduces error reporting's performance overhead but the line numbers in stack traces may be inaccurate.

When error reporting is enabled, the colored bar under the toolbar icon and to the left of the feature options is green. If it is disabled, the bar is orange. 


Because error reporting captures fields and local variables, sensitive information may be included in error reports. To avoid this, use the [DoNotCapture] and [DoNotCaptureVariables] attributes. For more information, see Using custom attributes.

You can't use error reporting for assemblies using Xbox XNA.

Standard template

Templates define both the look of the dialog box displayed to your user in the event of an exception, and the information included in the error report. SmartAssembly provides three standard templates for error reporting:

If you want the user to have control over whether an error message is sent, select Send error dialog box. This allows the user to decide whether to send an error report or to debug the problem themselves. You can also choose the language that the message is displayed in.

If you want to let users provide their email address when they choose to send an error report, select Dialog box + email address collection.

If you do not want the user to have control over whether a message is sent, but instead you want the message to be generated and sent automatically, select Automatic (without dialog box). Use Automatic (without dialog box) to report errors in applications that do not have a user interface, for example services and web applications.

Custom template (SmartAssembly Developer and Professional only)

You can customize the dialog box shown to your customers by using a custom error reporting template. For details on creating a custom template, see Error reporting with the SDK.

To select the custom template that you have created, on the project settings window in SmartAssembly, click Browse for Template.

Custom web server (SmartAssembly Developer and Professional only)

You can choose to send error reports to your own server rather than the default server operated by Redgate. For details on how to set up a custom web server, see Setting up the custom web server for reporting.


Didn't find what you were looking for?