Last active
December 4, 2018 22:35
-
-
Save h4t0n/d2d3c292073c47a604ee5501bbf48b18 to your computer and use it in GitHub Desktop.
Spring Error Handling Pattern
This file contains hidden or 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
public class GeminiException extends Exception { | |
String errorCodeName; | |
protected GeminiException(String errorCodeName) { | |
super(errorCodeName); | |
this.errorCodeName = errorCodeName; | |
} | |
protected GeminiException(String errorCodeName, String message) { | |
super(message); | |
this.errorCodeName = errorCodeName; | |
} | |
protected GeminiException(String errorCodeName, Exception e) { | |
super(e); | |
this.errorCodeName = errorCodeName; | |
} | |
public String getErrorCodeName() { | |
return errorCodeName; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment