code: 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);
              }
          };
      }
docs: ensures the function in the provided scope
  @param fn
  @param scope
  @returns {Function}