Created
October 30, 2012 15:12
-
-
Save PanosJee/3980821 to your computer and use it in GitHub Desktop.
Logged Exceptions for WP8/W8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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