From 75b90e9fa0bdcdfb4828c85a08e25209d2ff3a08 Mon Sep 17 00:00:00 2001 From: Ekaterina Zaytseva Date: Thu, 10 Jul 2025 19:42:11 +0300 Subject: [PATCH] [ArkTS][StdLib] ErrorOptions: class->interface Issue: #IC9I7Y Signed-off-by: Ekaterina Zaytseva --- base_sdk/ets/@ohos.base.ets | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/base_sdk/ets/@ohos.base.ets b/base_sdk/ets/@ohos.base.ets index b2576542..5668f3b9 100644 --- a/base_sdk/ets/@ohos.base.ets +++ b/base_sdk/ets/@ohos.base.ets @@ -14,22 +14,22 @@ */ export class BusinessError extends Error { - code: int; - data?: T; + code: int; + data?: T; - constructor() { - super(); - this.code = 0; - } + constructor() { + super(); + this.code = 0; + } - constructor(code: int, error: Error) { - super(error.name, error.message, new ErrorOptions(error.cause)); - this.code = code; - } + constructor(code: int, error: Error) { + super(error.name, error.message, {cause: error.cause} as ErrorOptions); + this.code = code; + } - constructor(code: int, data: T, error: Error) { - super(error.name, error.message, new ErrorOptions(error.cause)); - this.code = code; - this.data = data; - } + constructor(code: int, data: T, error: Error) { + super(error.name, error.message, {cause: error.cause} as ErrorOptions); + this.code = code; + this.data = data; + } } \ No newline at end of file -- Gitee