01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tc.exception;
05:
06: /**
07: * Helper for extracting proximate cause and ultimate cause from exceptions.
08: */
09: public interface ExceptionHelper {
10:
11: /**
12: * Check whether this helper accepts the kind of t
13: * @param t Throwable
14: * @return True if it accepts, false if not
15: */
16: public boolean accepts(Throwable t);
17:
18: /**
19: * Get closest cause
20: * @param t Throwable
21: * @return Closest cause
22: */
23: public Throwable getProximateCause(Throwable t);
24:
25: /**
26: * Get original cause
27: * @param t Throwable
28: * @return Original cause
29: */
30: public Throwable getUltimateCause(Throwable t);
31:
32: }
|