unierror.uts 619 字节
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
import { InstallApkErrorCode, InstallApkFail } from "./interface.uts"

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

18 19
export class InstallApkFailImpl extends UniError implements InstallApkFail {
  override errCode : InstallApkErrorCode
20 21 22 23 24 25 26
	constructor(errCode : InstallApkErrorCode) {
		super();
		this.errSubject = UniErrorSubject;
		this.errCode = errCode;
		this.errMsg = UniErrors[errCode] ?? "";
	}
}