mirror of
https://github.com/JuanCanham/HackMyResume.git
synced 2025-05-03 04:47:07 +01:00
Adjust error handling / tests.
This commit is contained in:
9
dist/cli/main.js
vendored
9
dist/cli/main.js
vendored
@ -119,12 +119,9 @@ Definition of the `main` function.
|
||||
}, true);
|
||||
}
|
||||
Command.prototype.missingArgument = function(name) {
|
||||
if (this.name() !== 'new') {
|
||||
throw {
|
||||
fluenterror: HMSTATUS.resumeNotFound,
|
||||
quit: true
|
||||
};
|
||||
}
|
||||
_err.err({
|
||||
fluenterror: this.name() !== 'new' ? HMSTATUS.resumeNotFound : HMSTATUS.createNameMissing
|
||||
}, true);
|
||||
};
|
||||
Command.prototype.helpInformation = function() {
|
||||
var manPage;
|
||||
|
2
dist/verbs/create.js
vendored
2
dist/verbs/create.js
vendored
@ -52,7 +52,7 @@ Implementation of the 'create' verb for HackMyResume.
|
||||
return r;
|
||||
}, this);
|
||||
if (this.hasError() && !opts.assert) {
|
||||
this.reject(results);
|
||||
this.reject(this.errorCode);
|
||||
} else if (!this.hasError()) {
|
||||
this.resolve(results);
|
||||
}
|
||||
|
1
dist/verbs/validate.js
vendored
1
dist/verbs/validate.js
vendored
@ -58,7 +58,6 @@ Implementation of the 'validate' verb for HackMyResume.
|
||||
}
|
||||
r = _validateOne.call(this, t, validator, schemas);
|
||||
if (r.fluenterror) {
|
||||
console.log(r);
|
||||
r.quit = opts.assert;
|
||||
this.err(r.fluenterror, r);
|
||||
}
|
||||
|
3
dist/verbs/verb.js
vendored
3
dist/verbs/verb.js
vendored
@ -66,7 +66,8 @@ Definition of the Verb class.
|
||||
payload["throw"] = hot;
|
||||
this.setError(errorCode, payload);
|
||||
if (payload.quit) {
|
||||
this.reject(payload);
|
||||
console.log(payload);
|
||||
this.reject(errorCode);
|
||||
}
|
||||
this.fire('error', payload);
|
||||
if (hot) {
|
||||
|
Reference in New Issue
Block a user