From 39fcfc45246b278e598f9726c93a8dabd0b019cf Mon Sep 17 00:00:00 2001 From: xty Date: Fri, 20 Dec 2024 10:51:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=A3=80=E6=B5=8B=E5=91=8A?= =?UTF-8?q?=E8=AD=A6=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../uts-dialogpage/utssdk/unierror.uts | 39 ------------------- 1 file changed, 39 deletions(-) delete mode 100644 uni_modules/uts-dialogpage/utssdk/unierror.uts diff --git a/uni_modules/uts-dialogpage/utssdk/unierror.uts b/uni_modules/uts-dialogpage/utssdk/unierror.uts deleted file mode 100644 index c20aca6d..00000000 --- a/uni_modules/uts-dialogpage/utssdk/unierror.uts +++ /dev/null @@ -1,39 +0,0 @@ -/* 此规范为 uni 规范,可以按照自己的需要选择是否实现 */ -import { MyApiErrorCode, MyApiFail } from "./interface.uts" -/** - * 错误主题 - * 注意:错误主题一般为插件名称,每个组件不同,需要使用时请更改。 - * [可选实现] - */ -export const UniErrorSubject = 'uts-api'; - - -/** - * 错误信息 - * @UniError - * [可选实现] - */ -export const MyAPIErrors : Map = new Map([ - /** - * 错误码及对应的错误信息 - */ - [9010001, 'custom error mseeage1'], - [9010002, 'custom error mseeage2'], -]); - - -/** - * 错误对象实现 - */ -export class MyApiFailImpl extends UniError implements MyApiFail { - - /** - * 错误对象构造函数 - */ - constructor(errCode : MyApiErrorCode) { - super(); - this.errSubject = UniErrorSubject; - this.errCode = errCode; - this.errMsg = MyAPIErrors.get(errCode) ?? ""; - } -} -- GitLab