diff options
Diffstat (limited to 'website/usageExamples')
-rw-r--r-- | website/usageExamples/StandardExceptionExample_post.jpage | 18 | ||||
-rw-r--r-- | website/usageExamples/StandardExceptionExample_pre.jpage | 5 |
2 files changed, 23 insertions, 0 deletions
diff --git a/website/usageExamples/StandardExceptionExample_post.jpage b/website/usageExamples/StandardExceptionExample_post.jpage new file mode 100644 index 00000000..950ca898 --- /dev/null +++ b/website/usageExamples/StandardExceptionExample_post.jpage @@ -0,0 +1,18 @@ +public class ExampleException extends Exception { + public ExampleException() { + this(null, null); + } + + public ExampleException(String message) { + this(message, null); + } + + public ExampleException(Throwable cause) { + this(cause != null ? cause.getMessage() : null, cause); + } + + public ExampleException(String message, Throwable cause) { + super(message); + if (cause != null) super.initCause(cause); + } +}
\ No newline at end of file diff --git a/website/usageExamples/StandardExceptionExample_pre.jpage b/website/usageExamples/StandardExceptionExample_pre.jpage new file mode 100644 index 00000000..8d85286c --- /dev/null +++ b/website/usageExamples/StandardExceptionExample_pre.jpage @@ -0,0 +1,5 @@ +import lombok.experimental.StandardException; + +@StandardException +public class ExampleException extends Exception { +}
\ No newline at end of file |