diff --git a/src/commands/interface-manager/CommandException.ts b/src/commands/interface-manager/CommandException.ts index 2dfa8ec2..88f00b33 100644 --- a/src/commands/interface-manager/CommandException.ts +++ b/src/commands/interface-manager/CommandException.ts @@ -32,6 +32,7 @@ export class CommandException extends CommandError { public readonly exception: Error|unknown, message: string) { super(message) + this.log(); } public static Result(message: string, options: { exception: Error, exceptionKind: CommandExceptionKind }): CommandResult { diff --git a/src/commands/interface-manager/Validation.ts b/src/commands/interface-manager/Validation.ts index 65582ab6..3d17bd33 100644 --- a/src/commands/interface-manager/Validation.ts +++ b/src/commands/interface-manager/Validation.ts @@ -24,7 +24,6 @@ limitations under the License. * However, this file is modified and the modifications in this file * are NOT distributed, contributed, committed, or licensed under the Apache License. */ -import { LogService } from "matrix-bot-sdk"; type ValidationMatchExpression = { ok?: (ok: Ok) => any, err?: (err: Err) => any}; @@ -90,7 +89,7 @@ export class CommandError { public constructor( public readonly message: string, ) { - this.log(); + // nothing to do. } /** @@ -102,8 +101,4 @@ export class CommandError { public static Result(message: string, _options = {}): CommandResult { return CommandResult.Err(new CommandError(message)); } - - protected log(): void { - LogService.info("CommandError", this.message); - } }