Skip to content
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

Closed
wants to merge 6 commits into from
Closed

Conversation

HelenaEksler
Copy link
Contributor

#51

@HelenaEksler
Copy link
Contributor Author

@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");
Copy link
Member

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.
Copy link
Contributor Author

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.

Copy link
Member

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";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

" => '

@HelenaEksler
Copy link
Contributor Author

@amitaibu Ready.

@amitaibu
Copy link
Member

Merged.

@amitaibu amitaibu closed this Nov 30, 2015
@amitaibu amitaibu deleted the 51 branch November 30, 2015 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants