try { // your code int a = 1/0; // this will raise an exception } catch (Exception e) { BugSenseHandler.log(“YOUR_TAG”, e); }