code: function DuplicateCommandError(msg, more) {
    // Pass the constructor to V8's
    // captureStackTrace to clean up the output
    Error.captureStackTrace(this, DuplicateCommandError);
  
    // If defined, store a custom error message
    if (msg) {
      this.message = msg;
    }
  
    // If defined, store more infos
    if (more) {
      this.more = more;
    }
  }
docs: Create a new custom Error constructor