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

figure out how much to offset the first line in Node #1

Open
catdad opened this issue Oct 5, 2016 · 6 comments
Open

figure out how much to offset the first line in Node #1

catdad opened this issue Oct 5, 2016 · 6 comments

Comments

@catdad
Copy link
Owner

catdad commented Oct 5, 2016

It's usually 62 lines, from what I have tested, but I wonder if it is actually different between versions. Perhaps I need to calculate it? Although, there is no reason to believe that the version of node running this module is also the version of node that generated the stack trace.

Anyway, think about it.

@catdad
Copy link
Owner Author

catdad commented Oct 6, 2016

@catdad
Copy link
Owner Author

catdad commented Oct 8, 2016

I'm counting this for now. Will need to investigate whether this is the same for all versions of Node.

if (errObj.line === 1) {
// node issue with adding code to the first line
errObj.column -= 62;
}

@fkour
Copy link

fkour commented Dec 21, 2017

Would, getting the value from NativeModule wrapper itself helps ?

github1

@catdad
Copy link
Owner Author

catdad commented Dec 22, 2017

That's not a bad idea. Is this one of the undocumented modules? I couldn't find docs for it, so I am not sure if it has a frozen API, if it might change over time, etc.

@fkour
Copy link

fkour commented Dec 22, 2017

It comes from : node/lib/internal/bootstrap_node.js

Line 609

@fkour
Copy link

fkour commented Jan 3, 2018

It seems the documentation for using the require('module') is on NodeJS Modules

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

No branches or pull requests

2 participants