Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

UncaughtExceptionHandler

By: a guest on Jul 12th, 2012  |  syntax: Java  |  size: 0.26 KB  |  views: 8  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. public static void main(String[] args) {
  2.         Thread.setUncaughtExceptionHandler(new UncaughtExceptionHandler() {
  3.                 @Override
  4.                 public void uncaughtException(Thread t, Throwable e) {
  5.                         ErrorLogging.log(e.getStackTrace(), e.getMessage());
  6.                 }
  7.         });
  8.  
  9.         getInstance();
  10. }