Initial commit of akmon project
This commit is contained in:
30
uni_modules/uni-openLocation/utssdk/unierror.uts
Normal file
30
uni_modules/uni-openLocation/utssdk/unierror.uts
Normal file
@@ -0,0 +1,30 @@
|
||||
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) ?? "";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user