1 4 package com.tc.exception; 5 6 public class RuntimeExceptionHelper implements ExceptionHelper { 7 8 public boolean accepts(Throwable t) { 9 return t instanceof RuntimeException ; 10 } 11 12 public Throwable getProximateCause(Throwable t) { 13 return (t instanceof RuntimeException && ((RuntimeException ) t).getCause() != null) ? ((RuntimeException ) t) 14 .getCause() : t; 15 } 16 17 public Throwable getUltimateCause(Throwable t) { 18 throw new AssertionError (); 19 } 20 21 } 22 | Popular Tags |