This repository has been archived by the owner on Jul 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(exitCodes): adding exit codes for configuration file errors
- Loading branch information
Showing
6 changed files
with
65 additions
and
26 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import * as Logger from './logger'; | ||
|
||
export class ProtractorError extends Error { | ||
msg: string; | ||
code: number; | ||
constructor(msg: string, code: number) { | ||
super(msg); | ||
this.msg = msg; | ||
this.code = code; | ||
Logger.error('error code: ' + this.code + ' - ' + this.msg); | ||
} | ||
} | ||
|
||
const CONFIG_ERROR_CODE = 105; | ||
|
||
/** | ||
* Configuration file error | ||
*/ | ||
export class ConfigError extends ProtractorError { | ||
constructor(msg: string) { super(msg, CONFIG_ERROR_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
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