Skip to content

Instantly share code, notes, and snippets.

@LiamJolly
Created May 6, 2017 05:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LiamJolly/1591af25d63377d9bf0b24fccb9c68d0 to your computer and use it in GitHub Desktop.
Save LiamJolly/1591af25d63377d9bf0b24fccb9c68d0 to your computer and use it in GitHub Desktop.
An example Java exception to demonstrate what is important when it comes to testing.
package com.liamdjolly;
public class MyException extends Exception {
public MyException() {
}
public MyException(String message) {
super(message);
}
public MyException(String message, Throwable cause) {
super(message, cause);
}
public MyException(Throwable cause) {
super(cause);
}
public MyException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
super(message, cause, enableSuppression, writableStackTrace);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment