Resolve "WIP: UTXO Selection and Storage"
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
export class ExtError extends Error {
|
||||
constructor(
|
||||
message: string,
|
||||
public readonly details?: string,
|
||||
) {
|
||||
super(message);
|
||||
|
||||
// Capture the stack trace (V8 engines only)
|
||||
// This step ensures the stack trace is captured correctly
|
||||
if (Error.captureStackTrace) {
|
||||
Error.captureStackTrace(this, ExtError);
|
||||
} else {
|
||||
this.stack = new Error().stack;
|
||||
console.error(this.stack);
|
||||
}
|
||||
|
||||
// 👇️ because we are extending a built-in class
|
||||
Object.setPrototypeOf(this, ExtError.prototype);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user