title: Unable to catch exception from TimerTask thread
body: <p>I have a Java class which starts a TimerTask in its main method, the class extending TimerTask is an inner class (Class myTimer extends TimerTask). In its run method myTimer throws an exception, In the main method I am trying to catch the exception like this:</p>
  
  <pre><code>try {
    timer.schedule(new myTimer(arg1, arg2), 0, RETRY_PERIOD);
  } catch (Exception e) {
       System.out.println("Exception caught");
  }
  </code></pre>
  
  <p>But this doesn't work, it never catches the exception, myTimer thread throws. Any ideas how to do that ?</p>