Files
2026-01-20 08:04:15 +08:00

31 lines
664 B
Plaintext

import { OpenLocationErrorCode, OpenLocationFail } from "./interface.uts"
/**
* 错误主题
*/
export const UniErrorSubject = 'uni-openLocation';
/**
* 错误码
* @UniError
*/
export const UniErrors : Map<OpenLocationErrorCode, string> = new Map([
/**
* 框架内部错误
*/
[4, 'internal error']
]);
export class OpenLocationFailImpl extends UniError implements OpenLocationFail {
// #ifndef APP-IOS
override errCode : OpenLocationErrorCode;
// #endif
constructor(errCode : OpenLocationErrorCode) {
super();
this.errSubject = UniErrorSubject;
this.errCode = errCode;
this.errMsg = UniErrors.get(errCode) ?? "";
}
}