-
Notifications
You must be signed in to change notification settings - Fork 507
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HouseKeeping: Moved errors to one place (#201)
* added ExitError and ValidationError to errors package and replaced their usage across repository packages * added changeset * extend extendableError package instead of extending JS Error class, for better message logging * updated changesets * Maybe it's the cache? * Try a thing
- Loading branch information
1 parent
51a0d76
commit 5ababa0
Showing
13 changed files
with
54 additions
and
30 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"@changesets/cli": patch | ||
"@changesets/config": patch | ||
--- | ||
|
||
Updated to use the Error classes from the @changesets/errors package |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"@changesets/errors": patch | ||
--- | ||
|
||
- Added ExitError class and ValidationError class | ||
- Extend extendable-error in our error classes instead of JS Error class due to better Error messages thrown |
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
This file was deleted.
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
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,5 +1,19 @@ | ||
export class GitError extends Error { | ||
constructor(exitCode: number, message: string) { | ||
super(`Error: Git - ${message}, exit code: ${exitCode}`); | ||
import ExtendableError from "extendable-error"; | ||
|
||
export class GitError extends ExtendableError { | ||
code: number; | ||
constructor(code: number, message: string) { | ||
super(`${message}, exit code: ${code}`); | ||
this.code = code; | ||
} | ||
} | ||
|
||
export class ValidationError extends ExtendableError {} | ||
|
||
export class ExitError extends ExtendableError { | ||
code: number; | ||
constructor(code: number) { | ||
super(`The process exited with code: ${code}`); | ||
this.code = code; | ||
} | ||
} |
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