Created
April 2, 2018 22:01
-
-
Save jotajr/054e828945daba3c8b085c848fdbc761 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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