-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
14901a5
commit a7ca7b1
Showing
4 changed files
with
11 additions
and
2 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,10 +1,15 @@ | ||
export class MSAError extends Error { | ||
public readonly stage: string; | ||
public readonly cause: Error; | ||
|
||
constructor(stage: string, cause?: Error) { | ||
super(`${stage}: ${cause ? cause.message : ""}`); | ||
super(`${ stage }: ${ cause ? cause.message : "" }`); | ||
Object.setPrototypeOf(this, MSAError.prototype); | ||
this.stage = stage; | ||
this.cause = cause; | ||
} | ||
|
||
get name(): string { | ||
return 'MSAError'; | ||
} | ||
} |