"use strict";
/**
 * Utility for creating custom error classes
 * @module
 */
let createError = require('custom-error');
let BaseError = createError('InternalError');
/**
 * Base Error class from which all custom error classes derive
 * @constructor
 */
exports.BaseError = BaseError;
/**
 * Create a custom error class
 * @param {String} errorName Name of custom error class (reflected in name property)
 * @return {Error} Error subclass constructor
 */
exports.create = function (errorName) {
    return createError(errorName, BaseError);
};
