Click or drag to resize
BabelReportingExtensionsReportExceptions Method
A BabelReporting extension method that configure exception reporting.

Namespace:  Babel.Licensing
Assemblies:   Babel.Licensing (in Babel.Licensing.dll) Version: 2.5.0.0
  Babel.Licensing (in Babel.Licensing.dll) Version: 2.5.0.0
Syntax
public static BabelReporting ReportExceptions(
	this BabelReporting self,
	Action<ExceptionReportOptions> configureOptions = null
)

Parameters

self
Type: Babel.LicensingBabelReporting
The self to act on.
configureOptions (Optional)
Type: SystemActionExceptionReportOptions
(Optional) Options for controlling the reporting configuration.

Return Value

Type: BabelReporting
The input BabelReporting object.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type BabelReporting. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Examples
// Configure BabelReporting services
BabelReportingConfiguration config = new BabelReportingConfiguration();

config.ServiceUrl = "http://www.localhost/reports/api";
config.ApiKey = "KRpttA/l0c53dHWnTBe6vRTykyv5bhv08reSoTWGWSk=";
config.RetryCount = 3;

// Send application unhandle exception reports 
var reporting = BabelReporting.Create(config)
    .ReportExceptions(options => {
        options.Environment.EnvironmentVariables.Add("COMPUTER*");
        options.Environment.ProcessNames.Add("SQL*");
    });

try
{
    DoSomething();
}
catch (Exception ex)
{
    // Send the exception report
    await BabelReporting.Instance.SendExceptionReportAsync(ex);
}
See Also