unierror.uts 579 字节
Newer Older
DCloud-yyl's avatar
DCloud-yyl 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
import { AppThemeErrorCode, IAppThemeFail } from "./interface.uts"

/**
 * 错误主题
 */
export const AppThemeUniErrorSubject = 'uni-theme';

/**
 * 错误码
 * @UniError
 */
export const AppThemeUniErrors : Map<AppThemeErrorCode, string> = new Map([
	[702001, 'invalid parameter'],
	[2002000, 'unknown error']
]);

export class AppThemeFailImpl extends UniError implements IAppThemeFail {
	constructor(errCode : AppThemeErrorCode) {
		super();
		this.errSubject = AppThemeUniErrorSubject;
		this.errCode = errCode;
		this.errMsg = AppThemeUniErrors.get(errCode) ?? "";
	}
}