0
0
Fork 0
deno_monorepo/net/irc/error.ts

16 lines
298 B
TypeScript

/**
* @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;
}
}