diff --git a/uni_modules/uts-dialogpage/utssdk/unierror.uts b/uni_modules/uts-dialogpage/utssdk/unierror.uts deleted file mode 100644 index c20aca6dd9198f9fa2de2514dc419c18cbe04e57..0000000000000000000000000000000000000000 --- 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<MyApiErrorCode, string> = 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) ?? ""; - } -}