From 461be9cd32d417663c2d531740d896ac8ec5f1d1 Mon Sep 17 00:00:00 2001 From: zzz701 Date: Sat, 30 Aug 2025 12:30:47 +0800 Subject: [PATCH] =?UTF-8?q?BusinessError=E6=9E=84=E9=80=A0=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=20=E5=8E=BB=E9=99=A4code?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zzz701 --- base_sdk/ets/@ohos.base.ets | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/base_sdk/ets/@ohos.base.ets b/base_sdk/ets/@ohos.base.ets index 2b5a6d30..47481387 100644 --- a/base_sdk/ets/@ohos.base.ets +++ b/base_sdk/ets/@ohos.base.ets @@ -14,7 +14,6 @@ */ export class BusinessError extends Error { - code: int; data?: T; constructor() { @@ -32,4 +31,9 @@ export class BusinessError extends Error { this.code = code; this.data = data; } + + constructor(code: int, message: string, data?: T) { + super(code, message); + this.data = data; + } } \ No newline at end of file -- Gitee