1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2025-06-26 13:51:05 +01:00

Adjust error handling / tests.

This commit is contained in:
hacksalot
2016-02-01 22:56:08 -05:00
parent 70f45d468d
commit fd39cc9fd9
10 changed files with 34 additions and 23 deletions

View File

@ -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);
}

View File

@ -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
View File

@ -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) {