mirror of
https://github.com/denoland/deno.git
synced 2025-08-03 02:22:40 +00:00
fix(cli/fmt_errors): Abbreviate long data URLs in stack traces (#12127)
Co-authored-by: Mike White <mike.white@auctane.com>
This commit is contained in:
parent
f840906943
commit
75ca013f07
9 changed files with 80 additions and 22 deletions
|
@ -218,17 +218,13 @@ delete Object.prototype.__proto__;
|
|||
);
|
||||
build.setBuildInfo(runtimeOptions.target);
|
||||
util.setLogDebug(runtimeOptions.debugFlag, source);
|
||||
// TODO(bartlomieju): a very crude way to disable
|
||||
// source mapping of errors. This condition is true
|
||||
// only for compiled standalone binaries.
|
||||
let prepareStackTrace;
|
||||
if (runtimeOptions.applySourceMaps) {
|
||||
prepareStackTrace = core.createPrepareStackTrace(
|
||||
errorStack.opApplySourceMap,
|
||||
);
|
||||
} else {
|
||||
prepareStackTrace = core.createPrepareStackTrace();
|
||||
}
|
||||
const prepareStackTrace = core.createPrepareStackTrace(
|
||||
// TODO(bartlomieju): a very crude way to disable
|
||||
// source mapping of errors. This condition is true
|
||||
// only for compiled standalone binaries.
|
||||
runtimeOptions.applySourceMaps ? errorStack.opApplySourceMap : undefined,
|
||||
errorStack.opFormatFileName,
|
||||
);
|
||||
// deno-lint-ignore prefer-primordials
|
||||
Error.prepareStackTrace = prepareStackTrace;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue