src/third_party/specimenTools/lib/bower_components/Atem-Errors/lib/errors.js
/**
     * ES6/Promises have the fundamental flaw, that, if there is no
     * Error handler attached, an unhandled error stays unnoticed and
     * just disappears.
     * Because handling all Errors always correctly is not possible at
     * any given time e.g. a program may still be under construction for
     * example, this is a default handler to mark a promise as unhandled.
     *
     * Using this error-handler at the very end of the promise chain
     * ensures that the unhandled Proxy exception is not just disappearing
     * unnoticed by the main program.
     */
ES6/Promises have the fundamental flaw, that, if there is no
Error handler attached, an unhandled error stays unnoticed and
just disappears.
Because handling all Errors always correctly is not possible at
any given time e.g. a program may still be under construction for
example, this is a default handler to mark a promise as unhandled.

Using this error-handler at the very end of the promise chain
ensures that the unhandled Proxy exception is not just disappearing
unnoticed by the main program.
ES6 / Promises have the fundamental flaw that if there is no Error handler attached an unhandled error stays unnoticed and just disappears . Because handling all Errors always correctly is not possible at any given time e . g . a program may still be under construction for example this is a default handler to mark a promise as unhandled . Using this error - handler at the very end of the promise chain ensures that the unhandled Proxy exception is not just disappearing unnoticed by the main program .
function unhandledPromise(originalError) {
        var error = new errors.Unhandled(originalError+'\n'+originalError.stack);
        error.originalError = originalError;
        setTimeout(function unhandledError(){throw error;}, 0);
    }
function unhandledPromise ( originalError ) { var error = new errors . Unhandled ( originalError + '\n' + originalError . stack ) ; error . originalError = originalError ; setTimeout ( function unhandledError ( ) { throw error ; } , 0 ) ; }
ES6/Promises have the fundamental flaw, that, if there is no
 Error handler attached, an unhandled error stays unnoticed and
 just disappears.
ES6 / Promises have the fundamental flaw that if there is no Error handler attached an unhandled error stays unnoticed and just disappears .
// use setTimout to escape the catch all that es6/Promise applies // and that silences unhandled errors