Use BoxError instead of Error in all places

This moves everything other than the addon code and some 'done' logic
This commit is contained in:
Girish Ramakrishnan
2019-12-04 10:29:06 -08:00
parent 3623831390
commit 30eccfb54b
17 changed files with 45 additions and 36 deletions

View File

@@ -10,7 +10,8 @@ exports = module.exports = {
getCertificate: getCertificate
};
var assert = require('assert');
var assert = require('assert'),
BoxError = require('../boxerror.js');
function getCertificate(hostname, domain, options, callback) {
assert.strictEqual(typeof hostname, 'string');
@@ -18,6 +19,6 @@ function getCertificate(hostname, domain, options, callback) {
assert.strictEqual(typeof options, 'object');
assert.strictEqual(typeof callback, 'function');
return callback(new Error('Not implemented'));
return callback(new BoxError(BoxError.NOT_IMPLEMENTED, 'getCertificate is not implemented'));
}