unierror.uts 578 字节
Newer Older
taohebin@dcloud.io's avatar
taohebin@dcloud.io 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
import { InstallApkErrorCode, InstallApkFail } from "./interface.uts"

/**
 * 错误主题
 */
export const UniErrorSubject = 'uni-installApk';
/**
 * 错误码
 * @UniError
 */
export const UniErrors : Map<InstallApkErrorCode, string> = new Map([
	/**
	 * 找不到文件
	 */
	[1300002, 'No such file'],
]);

export class InstallApkFailImpl extends UniError implements InstallApkFail {
	constructor(errCode : InstallApkErrorCode) {
		super();
		this.errSubject = UniErrorSubject;
		this.errCode = errCode;
		this.errMsg = UniErrors[errCode] ?? "";
	}
}