You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
421 B
16 lines
421 B
/**
|
|
* Error class used to generate debug stack traces, not thrown.
|
|
*/
|
|
export class DebuggingTraceIsNotAnError extends Error {
|
|
static getTrace(): string {
|
|
const oldLimit = Error.stackTraceLimit
|
|
if ( oldLimit < 50 ) {
|
|
Error.stackTraceLimit = 50
|
|
}
|
|
|
|
const trace = (new this()).stack || String(new this())
|
|
Error.stackTraceLimit = oldLimit
|
|
return trace
|
|
}
|
|
}
|