code: function PrimusError(message, logger) {
    Error.captureStackTrace(this, this.constructor);
  
    this.message = message;
    this.name = this.constructor.name;
  
    if (logger) {
      logger.emit('log', 'error', this);
    }
  }
docs: Generic Primus error.
  
  @constructor
  @param {String} message The reason for the error
  @param {EventEmitter} logger Optional EventEmitter to emit a `log` event on.
  @api public