fix: Fix cause
This commit is contained in:
parent
cae1efe87d
commit
cc09280c19
@ -120,8 +120,10 @@ class CameraError<TCode extends CameraErrorCode> extends Error {
|
|||||||
public get message(): string {
|
public get message(): string {
|
||||||
return this._message;
|
return this._message;
|
||||||
}
|
}
|
||||||
public get cause(): ErrorWithCause | undefined {
|
public get cause(): Error | undefined {
|
||||||
return this._cause;
|
const c = this._cause;
|
||||||
|
if (c == null) return undefined;
|
||||||
|
return new Error(`[${c.code}]: ${c.message}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user