mirror of
https://github.com/serverless/serverless.git
synced 2026-01-18 14:58:43 +00:00
Replace error throwing with Serverless error class
This commit is contained in:
parent
90c4feeca5
commit
db9dfdde45
@ -35,7 +35,7 @@ class PluginManager {
|
||||
|
||||
forEach(options, (value, key) => {
|
||||
if (value.required && (this.options[key] === true || !(this.options[key]))) {
|
||||
throw new Error(`Please provide the "${key}" option`);
|
||||
throw new this.serverless.classes.Error(`Please provide the "${key}" option`);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -61,7 +61,8 @@ class PluginManager {
|
||||
});
|
||||
|
||||
if (hooks.length === 0) {
|
||||
throw new Error('The command you entered was not found. Did you spell it correctly?');
|
||||
throw new this.serverless.classes.Error('The command you entered was not found. ' +
|
||||
'Did you spell it correctly?');
|
||||
}
|
||||
|
||||
// using arr.reduce to sequentially run promises in array in order
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user