DisableExceptionCatching disables any automatic unhandled exception handling in Insights that occurs outside of a try/catch block. Set this property to true and use the .Report()
method inside a try/catch block to record only desired exceptions.
Syntax
public static
bool DisableExceptionCatching { get; set; }
Value
Documentation for this section has not yet been entered.
Remarks
Example
When an exception occurs outside of a
try/catch, all of the exception is sent to the Insights Server by default. By using a
try/catch enclosure and setting the
Insights.DisableExceptionCatching property to
false, the developer can control exception reporting:
C# Example
Insights.DisableExceptionCatching = true;
...
try
{
using (var text = File.OpenText("saved_game001.txt"))
{
Console.WriteLine("{0}", text.ReadLine());
...
}
}
catch (FileNotFoundException ex)
{
Insights.Report(ex, new Dictionary<string,string>
{
{ "Filename", "saved_game001.txt" },
{ "Where", "Reload game" },
{ "Issue", "Index of available games is corrupted" }
});
}
Requirements
Namespace: Xamarin
Assembly: Xamarin.Insights (in Xamarin.Insights.dll)
Assembly Versions: 1.0.0.0