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
HashMap<String, String> map = new HashMap<String, String>(); | |
map.put("level", "second level"); | |
map.put("difficulty", "impossibruuu"); | |
BugSenseHandler.sendExceptionMap(map, ex); |
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
public void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
BugSenseHandler.initAndStartSession(Context, APIKEY); | |
setContentView(R.layout.main); | |
//rest of your code here | |
} |
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
public App() | |
{ | |
// Standard XAML initialization | |
InitializeComponent(); | |
// Phone-specific initialization | |
InitializePhoneApplication(); | |
// Language display initialization | |
InitializeLanguage(); |
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
// Adding custom extra to be sent with the crash | |
BugSenseHandler.AddToExtraData("xtra1key", "xtra1val"); | |
BugSenseHandler.AddToExtraData("xtra2key", "xtra2val"); | |
// Leave a breadcrump | |
BugSenseHandler.LeaveBreadcrumb("Fetch friends"); |
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
// Check is a task if task is faulted and log task exception if it failed | |
Task t = new Task(() => | |
{ | |
int x = 5; | |
int y = 0; | |
int z = x / y; | |
}); | |
t.Start(); |
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); | |
} |
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
<script src="http://www.bugsense.com/static/js/global/bugsense.js" type='text/javascript'></script> | |
<script type="text/javascript"> | |
var bugsense = new Bugsense( { apiKey: 'YOUR_API_KEY' } ); | |
</script> |
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
try { | |
rotateScreen(); | |
} catch ( error ) { | |
bugsense.notify( error, { rotation: 'not supported' } ) | |
}; |
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
// add metadata | |
bugsense.addExtraData( 'user_level', 'paid' ); | |
bugsense.addExtraData( 'account', 'CEO' ); | |
// Clear all metadata | |
bugsense.clearExtraData(); | |
// leave breadcrumb | |
bugsense.leaveBreadcrumb( 'Fetch Friendlist' ); |
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
// Create the app | |
var app = WinJS.Application; | |
// Initialize bugsense | |
var bugsense = new Bugsense( { | |
apiKey: 'YOUR_API_KEY', | |
context: app | |
} ); | |
// If you want to display a popup (against MS guidelines) add the message option |