Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: disable the emscriptem error handler #33

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

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