Skip to content

fix: disable the emscriptem error handler#33

Open
rtpg wants to merge 1 commit intoaduh95:mainfrom
rtpg:main
Open

fix: disable the emscriptem error handler#33
rtpg wants to merge 1 commit intoaduh95:mainfrom
rtpg:main

Conversation

@rtpg
Copy link

@rtpg rtpg commented Jan 31, 2023

This makes the following stack trace legible, instead of printing out all of the viz.js source code

fixes #32

% cat test.js
import vizRenderSync from "@aduh95/viz.js/sync";

function f() {
  return (undefined).a.b
}

f()

[0] % node test.js
file:///home/rtpg/proj/viz.js/test.js:4
  return (undefined).a.b
                     ^

TypeError: Cannot read property 'a' of undefined
    at f (file:///home/rtpg/proj/viz.js/test.js:4:22)
    at file:///home/rtpg/proj/viz.js/test.js:7:1
    at ModuleJob.run (internal/modules/esm/module_job.js:183:25)
    at async Loader.import (internal/modules/esm/loader.js:178:24)
    at async Object.loadESM (internal/process/esm_loader.js:68:5)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

global exception handler being added that causes gnarly stack traces

1 participant