Skip to content

Instantly share code, notes, and snippets.

@jotajr
Created April 2, 2018 22:01
Show Gist options
  • Save jotajr/054e828945daba3c8b085c848fdbc761 to your computer and use it in GitHub Desktop.
Save jotajr/054e828945daba3c8b085c848fdbc761 to your computer and use it in GitHub Desktop.
class CustomException extends Exception {
private String message = null;
public CustomException() {
super();
}
public CustomException(String message) {
super(message);
this.message = message;
}
public CustomException(Throwable cause) {
super(cause);
}
@Override
public String toString() {
return message;
}
@Override
public String getMessage() {
return message;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment