1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 15:18:08 +02:00

Merge pull request #19148 from nicolo-ribaudo/error-preserve-trace

Do not stringify errors when logging them
This commit is contained in:
Jonas Jenwald 2024-12-06 17:11:33 +01:00 committed by GitHub
commit c198e0b446
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 21 additions and 20 deletions

View file

@ -86,7 +86,7 @@ async function downloadManifestFiles(manifest) {
try {
await downloadFile(file, url);
} catch (ex) {
console.error(`Error during downloading of ${url}: ${ex}`);
console.error(`Error during downloading of ${url}:`, ex);
fs.writeFileSync(file, ""); // making it empty file
fs.writeFileSync(`${file}.error`, ex);
}

View file

@ -1192,7 +1192,7 @@ class Driver {
resolve();
})
.catch(reason => {
console.warn(`Driver._send failed (${url}): ${reason}`);
console.warn(`Driver._send failed (${url}):`, reason);
this.inFlightRequests--;
resolve();

View file

@ -18,7 +18,7 @@ const TestReporter = function (browser) {
resolve();
})
.catch(reason => {
console.warn(`TestReporter - send failed (${action}): ${reason}`);
console.warn(`TestReporter - send failed (${action}):`, reason);
resolve();
send(action, json);