-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set CI build item to error if .shoov.yml is missing #52
Conversation
@amitaibu Could you please review this PR? (screenshot is in the issue - #51 (comment)) |
@@ -63,7 +63,8 @@ module.exports = function(config, logger) { | |||
// Get Shoov configuration file from repository. | |||
.then(function(response) { | |||
if (!response) { | |||
throw new Error("Can't get .shoov.yml"); | |||
// Send other type of an error if file doesn't exist at all. | |||
throw new ReferenceError("Can't get .shoov.yml"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets extend Error with our own Error (e.g. BadRequestError
).
@@ -11,6 +11,18 @@ var debug = false; | |||
var conf = {}; | |||
var log = {}; | |||
|
|||
/** | |||
* Implements custom Error type "FileNotFoundError". Extends Error. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@amitaibu Not sure about Docs for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe Extends error object to indicate a missing .shoov.yml file.
* Error message | ||
*/ | ||
function FileNotFoundError(message) { | ||
this.name = "FileNotFoundError"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
" => '
@amitaibu Ready. |
Merged. |
#51