1. package org.springframework.scheduling.timer;
  2. import org.springframework.core.NestedRuntimeException;
  3. /**
  4. * RuntimeException to be thrown when a TimerTask implementation
  5. * encounters a (possibly checked) exception that it wants to rethrow.
  6. *
  7. * <p>This exception is analogous to Quartz' JobExecutionException.
  8. * Unfortunately, the Timer API does not specify such an exception itself.
  9. *
  10. * @author Juergen Hoeller
  11. * @since 19.03.2004
  12. * @see org.quartz.JobExecutionException
  13. * @deprecated The Timer's main loop will simply stop if a TimerTask
  14. * throws an exception. Therefore it's advisable to not throw an exception
  15. * from a TimerTask, except when intending to stop the entire Timer.
  16. */
  17. public class TimerTaskExecutionException extends NestedRuntimeException {
  18. /**
  19. * Create a new TimerTaskExecutionException.
  20. * @param msg the error message
  21. * @param ex the exception that occured within the TimerTask
  22. */
  23. public TimerTaskExecutionException(String msg, Throwable ex) {
  24. super(msg, ex);
  25. }
  26. }