-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #164 from Josuto/validation_exception
feat: export ValidationException
- Loading branch information
Showing
6 changed files
with
217 additions
and
95 deletions.
There are no files selected for viewing
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,35 @@ | ||
abstract class Exception extends Error { | ||
readonly error?: Error; | ||
|
||
constructor(message: string, error?: Error) { | ||
super(message); | ||
this.error = error; | ||
} | ||
} | ||
|
||
/** | ||
* Models a client provided illegal argument exception. | ||
*/ | ||
export class IllegalArgumentException extends Error { | ||
constructor(message: string) { | ||
super(message); | ||
export class IllegalArgumentException extends Exception { | ||
constructor(message: string, error?: Error) { | ||
super(message, error); | ||
} | ||
} | ||
|
||
/** | ||
* Models an undefined persistable domain object constructor exception. | ||
*/ | ||
export class UndefinedConstructorException extends Error { | ||
constructor(message: string) { | ||
super(message); | ||
export class UndefinedConstructorException extends Exception { | ||
constructor(message: string, error?: Error) { | ||
super(message, error); | ||
} | ||
} | ||
|
||
/** | ||
* Models a persistable domain object schema validation rule violation exception. | ||
*/ | ||
export class ValidationException extends Exception { | ||
constructor(message: string, error?: Error) { | ||
super(message, error); | ||
} | ||
} |
Oops, something went wrong.