Skip to content

Instantly share code, notes, and snippets.

@PanosJee
Created October 30, 2012 15:12
Show Gist options
  • Save PanosJee/3980821 to your computer and use it in GitHub Desktop.
Save PanosJee/3980821 to your computer and use it in GitHub Desktop.
Logged Exceptions for WP8/W8
// Without extra data
try
{
throw new Exception("error");
}
catch (Exception exc)
{
BugSenseHandler.Instance.LogException(exc);
}
// With extra data: single key-value pair
try
{
throw new Exception("error");
}
catch (Exception exc)
{
BugSenseHandler.Instance.LogException(exc,
"level", "5");
}
// With extra data: dictionary
try
{
throw new Exception("error");
}
catch (Exception exc)
{
BugSenseHandler.Instance.LogException(exc,
new Dictionary<string, string>()
{
{ "account", "Explorer" },
{ "level", "9"}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment