Skip to content

Commit

Permalink
fix MSAError name
Browse files Browse the repository at this point in the history
  • Loading branch information
InventivetalentDev committed Dec 8, 2024
1 parent 14901a5 commit a7ca7b1
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions dist/MSAError.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ export declare class MSAError extends Error {
readonly stage: string;
readonly cause: Error;
constructor(stage: string, cause?: Error);
get name(): string;
}
3 changes: 3 additions & 0 deletions dist/MSAError.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/MSAError.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion src/MSAError.ts
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';
}
}

0 comments on commit a7ca7b1

Please sign in to comment.