aboutsummaryrefslogtreecommitdiff
path: root/website/usageExamples/StandardExceptionExample_post.jpage
diff options
context:
space:
mode:
Diffstat (limited to 'website/usageExamples/StandardExceptionExample_post.jpage')
-rw-r--r--website/usageExamples/StandardExceptionExample_post.jpage8
1 files changed, 5 insertions, 3 deletions
diff --git a/website/usageExamples/StandardExceptionExample_post.jpage b/website/usageExamples/StandardExceptionExample_post.jpage
index 148603a9..950ca898 100644
--- a/website/usageExamples/StandardExceptionExample_post.jpage
+++ b/website/usageExamples/StandardExceptionExample_post.jpage
@@ -1,16 +1,18 @@
public class ExampleException extends Exception {
public ExampleException() {
+ this(null, null);
}
public ExampleException(String message) {
- super(message);
+ this(message, null);
}
public ExampleException(Throwable cause) {
- super(cause);
+ this(cause != null ? cause.getMessage() : null, cause);
}
public ExampleException(String message, Throwable cause) {
- super(message, cause);
+ super(message);
+ if (cause != null) super.initCause(cause);
}
} \ No newline at end of file