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

erlv8 doesn't provide stacktrace when Erlang-defined functions are called #76

Open
gleber opened this issue Nov 14, 2012 · 0 comments
Open

Comments

@gleber
Copy link
Contributor

gleber commented Nov 14, 2012

With require() function defined as a erlv8_fun in beamjs (which loads required file, wraps it in JS function, compiles the function and calls it) stacktrace of the error is not very useful:

[{<<"name">>,<<"Error">>},
 {<<"message">>,
  <<"Error: Error: TypeError: Cannot read property 'prototype' of undefined">>},
 {<<"stack">>,
  <<"Error: Error: Error: TypeError: Cannot read property 'prototype' of undefined
            at /home/gleber/code/opensource/app/app.js:7:14">>}]

While the stacktrace should look more or less like, since both "util.js" file and "request" package are required with require() calls:

TypeError: Cannot read property 'prototype' of undefined
    at /home/gleber/code/opensource/app/bundle/lib/node_modules/request/main.js:57:10
    at /home/gleber/code/opensource/app/util.js:10:2
    at /home/gleber/code/opensource/app/app.js:7:14

Any ideas where to look?

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

No branches or pull requests

1 participant