js/lib/utilities.js
function (fn, scope) {
        return function () {
            try {
                return fn.apply(scope, arguments);
            }
            catch (ex) {
                logger.error(ex);
                logger.error(ex.stack);
                logger.log('error bubbled up ' + ex);
            }
        };
    }
function (fn, scope) {
        return function () {
            try {
                return fn.apply(scope, arguments);
            }
            catch (ex) {
                logger.error(ex);
                logger.error(ex.stack);
                logger.log('error bubbled up ' + ex);
            }
        };
    }
function ( fn , scope ) { return function ( ) { try { return fn . apply ( scope , arguments ) ; } catch ( ex ) { logger . error ( ex ) ; logger . error ( ex . stack ) ; logger . log ( 'error bubbled up ' + ex ) ; } } ; }
ensures the function in the provided scope
@param fn
@param scope
@returns {Function}
ensures the function in the provided scope