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

Provide line number in error messages #5

Closed
orta opened this issue Oct 28, 2016 · 2 comments
Closed

Provide line number in error messages #5

orta opened this issue Oct 28, 2016 · 2 comments

Comments

@orta
Copy link
Member

orta commented Oct 28, 2016

Ideally if something like this comes up CocoaPods/CocoaPods#6101 (comment)

Nanaimo::Reader::ParseError - not a valid string at index 114798 (char is "$")
/Library/Ruby/Gems/2.0.0/gems/nanaimo-0.1.1/lib/nanaimo/reader.rb:251:in `raise_parser_error'
/Library/Ruby/Gems/2.0.0/gems/nanaimo-0.1.1/lib/nanaimo/reader.rb:116:in `parse_string'

It'd be good to say

Nanaimo::Reader::ParseError - not a valid string on line 432 row 233 (char is "$")
/Library/Ruby/Gems/2.0.0/gems/nanaimo-0.1.1/lib/nanaimo/reader.rb:251:in `raise_parser_error'
/Library/Ruby/Gems/2.0.0/gems/nanaimo-0.1.1/lib/nanaimo/reader.rb:116:in `parse_string'

Extra credit for:

Nanaimo::Reader::ParseError - not a valid string on line 432 row 233 (char is "$")

> [the actual line of code]  

/Library/Ruby/Gems/2.0.0/gems/nanaimo-0.1.1/lib/nanaimo/reader.rb:251:in `raise_parser_error'
/Library/Ruby/Gems/2.0.0/gems/nanaimo-0.1.1/lib/nanaimo/reader.rb:116:in `parse_string'

@segiddins
Copy link
Member

I thought I did that?

@segiddins
Copy link
Member

Ah the error just has a location property already, this shouldn't be too hard to wire up

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