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
| // 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
| 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
| 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
| 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
| try{ | |
| String a = null; | |
| a.toString(); | |
| }catch(Exception ex) { | |
| ex.printStackTrace(); // in case you want to see the stacktrace in your log cat output | |
| BugSenseHandler.sendException(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
| HashMap<String, String> extras = new HashMap<String, String>(); | |
| extras.put("level", "second level"); | |
| extras.put("difficulty", "impossibruuu"); | |
| BugSenseHandler.addCrashExtraMap(extras); |
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, HOSTURL); | |
| 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
| // For example if you want to get the last 1000 lines and log all messages | |
| // with priority level "warning" and higher | |
| BugSenseHandler.setLogging(1000, "*:W"); | |
| //Log last 100 messages | |
| BugSenseHandler.readLogs(100); | |
| //Log all the messages with priority level "warning" and higher, on all tags. | |
| BugSenseHandler.readLogs("*:W"); |
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
| { | |
| "application_environment":{ | |
| "appname":"crash-me3", | |
| "appver":"1.0", | |
| "build_uuid":"7D65A0DB-C9E1-499F-9D20-BFE10E117181", | |
| "carrier":"vf GR", | |
| "gps_on":true, | |
| "image_base_address":"0x2e000", | |
| "image_size":"0x26000", | |
| "internal_version":"1.0", |