1 4 package com.tc.exception; 5 6 import org.mortbay.util.MultiException; 7 8 public class MortbayMultiExceptionHelper implements ExceptionHelper { 9 10 public boolean accepts(Throwable t) { 11 return t instanceof MultiException; 12 } 13 14 public Throwable getProximateCause(Throwable t) { 15 if (t instanceof MultiException) { 16 MultiException m = (MultiException) t; 17 if (m.size() > 0) return m.getThrowable(0); 18 } 19 return t; 20 } 21 22 public Throwable getUltimateCause(Throwable t) { 23 throw new AssertionError (); 24 } 25 26 } 27 | Popular Tags |