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

Silent incorrect behaving when filepath is undefined #16

Open
tunnckoCore opened this issue Jul 8, 2018 · 0 comments
Open

Silent incorrect behaving when filepath is undefined #16

tunnckoCore opened this issue Jul 8, 2018 · 0 comments

Comments

@tunnckoCore
Copy link
Owner

Add check like that and allow passng options.filename, sometimes it is known, so you can detect in the stack and just return that line. So later you can just parse it to get line and column.

  if (!filepath && !options.filename) {
    throw new Error('find-callsite: filepath cant be found, pass opts.filename')
  }
  filepath = filepath || options.filename
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