/** * @file * @copyright 2020, Valentin Anger * @license ISC */ export default class IrcError extends Error { constructor(public message: string, public code?: string) { super(); } toString(): string { return this.message + this.code == undefined ? "" : ": " + this.code; } }