code: function (callback, trace) {
        return function (arg) {
          try {
            callback(arg);
          } catch (error) {
            if (this.listenerCount('error')) {
              this.emit('error', error, trace);
            } else {
              console.error(error, trace);
            }
          }
        }.bind(this);
      }
docs: .catchError(callback Function, trace Error) :Function