function enforce(err) {
    if (_.isString(err)) err = new Error(err);
    err.message = err.message.replace(/^Error: /, '');

    return err;
}
// Enforce as an Error object, and cleanup message
Enforce as an Error object, and cleanup message
Enforce as an Error object and cleanup message
function enforce(err) {
    if (_.isString(err)) err = new Error(err);
    err.message = err.message.replace(/^Error: /, '');
    return err;
}
function enforce ( err ) { if ( _ . isString ( err ) ) err = new Error ( err ) ; err . message = err . message . replace ( / ^Error:  / , '' ) ; return err ; }
Enforce as an Error object, and cleanup message
Enforce as an Error object and cleanup message