01: package org.sakaiproject.portal.render.api;
02:
03: import java.io.IOException;
04:
05: /**
06: * Exception thrown when an error occurs while preprocessing or rendering a
07: * portlet.
08: *
09: * @since Sakai 2.2.3
10: * @version $Rev: 21708 $
11: */
12: public class ToolRenderException extends IOException {
13:
14: /**
15: * Root cause;
16: */
17: private Throwable throwable;
18:
19: /**
20: * Default constructor
21: *
22: * @param message
23: * the exception message
24: * @param throwable
25: * the root cause.
26: */
27: public ToolRenderException(String message, Throwable throwable) {
28: super (message);
29: this .throwable = throwable;
30: }
31:
32: /**
33: * Alternate constructor indicating that this exception is the root cause.
34: *
35: * @param message
36: * the exception message
37: */
38: public ToolRenderException(String message) {
39: super (message);
40: }
41:
42: /**
43: * Retrieve the exception which caused this exception to be rethrown.
44: *
45: * @return the root cause
46: */
47: public Throwable getThrowable() {
48: return throwable;
49: }
50:
51: }
|