From 425ac1b684a088567555d510793b74a40de3a0ff Mon Sep 17 00:00:00 2001 From: unanmed <1319491857@qq.com> Date: Thu, 17 Apr 2025 14:04:35 +0800 Subject: [PATCH] fix: logger catch --- packages/common/src/logger.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/common/src/logger.ts b/packages/common/src/logger.ts index 4ee1141..c711a01 100644 --- a/packages/common/src/logger.ts +++ b/packages/common/src/logger.ts @@ -186,7 +186,11 @@ export class Logger { this.disable(); this.catching = true; const ret = fn(); - this.catching = false; + if (this.catchStack.length === 0) { + this.catching = false; + } else { + this.catching = true; + } if (before) this.enable(); this.catchStack.pop();