Errors Standardization (#1246)

* errors and stuff

* more errors

* all the errors

* fix build
This commit is contained in:
Gus Caplan
2017-06-25 12:48:05 -05:00
committed by Amish Shah
parent 602fe06f88
commit 63e54982f4
28 changed files with 258 additions and 102 deletions
+3 -1
View File
@@ -1,3 +1,5 @@
const { Error } = require('../../../errors');
const list = [
require('./NodeOpusEngine'),
require('./OpusScriptEngine'),
@@ -30,5 +32,5 @@ exports.fetch = engineOptions => {
exports.guaranteeOpusEngine = () => {
if (typeof opusEngineFound === 'undefined') opusEngineFound = Boolean(exports.fetch());
if (!opusEngineFound) throw new Error('Couldn\'t find an Opus engine.');
if (!opusEngineFound) throw new Error('OPUS_ENGINE_MISSING');
};