From ea8211c5ff77605bf6239ff4219068b88673ba3d Mon Sep 17 00:00:00 2001 From: GRZ4NA Date: Tue, 7 Sep 2021 18:01:37 +0200 Subject: [PATCH] create CommandNotFound error --- src/errors.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/errors.ts b/src/errors.ts index 6356715..700038d 100644 --- a/src/errors.ts +++ b/src/errors.ts @@ -68,3 +68,12 @@ export class OperationSuccess { this.command = c; } } + +export class CommandNotFound extends Error { + public readonly query?: string; + + constructor(q?: string) { + super("Command not found"); + this.query = q; + } +}