跳到主要内容

EncryptedError

Defined in: packages/rxdb-adapter-encrypted/src/errors.ts:58

@aiao/rxdb-adapter-encrypted 抛出的所有错误的抽象基类。

携带可选的结构化字段(entity、property、hint、cause) 以及由各具体子类定义的稳定 code 字面量。

Extends​

  • Error

Extended by​

Constructors​

Constructor​

protected new EncryptedError(name, init?): EncryptedError;

Defined in: packages/rxdb-adapter-encrypted/src/errors.ts:74

Parameters​

ParameterTypeDescription
namestring该错误类的稳定公开标识,必须是字面量。 这里不能写 new.target.name:那读的是构造函数身份,minify 一过就退化成 "n" / "r" 这种单字母。源码单测对此免疫(源码不会被 mangle), 退化只在装进用户项目的产物里才现形——所以字面量是唯一的防线,改这里务必手工 在打包产物上复核一次。
initEncryptedErrorInit结构化上下文

Returns​

EncryptedError

Overrides​

Error.constructor

Properties​

cause?​

readonly optional cause?: unknown;

Defined in: packages/rxdb-adapter-encrypted/src/errors.ts:63

Overrides​

Error.cause

code​

abstract readonly code: EncryptedErrorCode;

Defined in: packages/rxdb-adapter-encrypted/src/errors.ts:59


entity?​

readonly optional entity?: string;

Defined in: packages/rxdb-adapter-encrypted/src/errors.ts:60


hint?​

readonly optional hint?: string;

Defined in: packages/rxdb-adapter-encrypted/src/errors.ts:62


message​

message: string;

Defined in: node_modules/.pnpm/typescript@6.0.3_patch_hash=ef3c2292deb88eb14130359d5acc1febc0226af46b7b945db6c7250c6cb4efbb/node_modules/typescript/lib/lib.es5.d.ts:1075

Inherited from​

Error.message

name​

name: string;

Defined in: node_modules/.pnpm/typescript@6.0.3_patch_hash=ef3c2292deb88eb14130359d5acc1febc0226af46b7b945db6c7250c6cb4efbb/node_modules/typescript/lib/lib.es5.d.ts:1074

Inherited from​

Error.name

property?​

readonly optional property?: string;

Defined in: packages/rxdb-adapter-encrypted/src/errors.ts:61


stack?​

optional stack?: string;

Defined in: node_modules/.pnpm/typescript@6.0.3_patch_hash=ef3c2292deb88eb14130359d5acc1febc0226af46b7b945db6c7250c6cb4efbb/node_modules/typescript/lib/lib.es5.d.ts:1076

Inherited from​

Error.stack