Skip to content

Commit

Permalink
better error reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
JosuaKrause committed Jul 28, 2023
1 parent 816bc15 commit f89e696
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions js/pixelcanvas.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,15 @@ export default class PixelCanvas {
try {
if (e.error && e.error.stack) {
this.writeError(`${e.error.stack}`);
} else {
} else if (e.message) {
this.writeError(
`${e.message} (${e.filename}:${e.lineno}:${e.colno})`,
);
}
} catch (_) {
try {
} else {
this.writeError(`Uncaught Error: ${e.error}`);
} catch (_) {
// give up
}
} catch (_) {
// can't write -- let normal error reporting handle it
}
return false;
});
Expand Down

0 comments on commit f89e696

Please sign in to comment.