code: function BaseError(message, err) {
    if(!this || this.constructor === BaseError) {
      throw new TypeError('BaseError constructor should only be used within other error constructors');
    }
  
    Error.call(this);
  
    this.__fxotype__ = this.constructor.name; // This is used by the core
    this.message = message || '';
  
    if(err) {
      this.err = err;
    }
  
    // It's important that this is set up at the end, because it uses the
    // toString prototype method, which relies on the `message` property.
  
    // This method is more reliable than Error.captureStackTrace - the stack and
    // the message are more accurate.
    this.stack = this.toString() + '\n' + getStackWithoutMessage();
  }
docs: BaseError
  
  Base class for all error classes