Patterns for error messages

  • Thread starter Victor 'Zverok' Shepelev
  • Start date
V

Victor 'Zverok' Shepelev

Hello all.

It seems that the question relates to interpreter "internals", but I'm
afraid of ask silly questions in ruby-core.

The question is: why error messages of interpreter has inconsistent
addressing system of file and line?

There are at many slightly different schemes (and all of them can be present
in the same error backtrace):

path/file.rb:10: error text
path/file.rb:1:in `require': other-path/other-file.rb:31: error text
path/file.rb:7:in `method' error text
^ from path/file.rb:12

And so on. I can't invent one regexp for my output-capturing text editor
(EditPlus on Windows) for catch all cases and automatically extract file and
path for navigate me to this path.

Thanks for the answers.

v.
 
S

Stefano Crocco

Alle Saturday 01 March 2008, Victor 'Zverok' Shepelev ha scritto:
Hello all.

It seems that the question relates to interpreter "internals", but I'm
afraid of ask silly questions in ruby-core.

The question is: why error messages of interpreter has inconsistent
addressing system of file and line?

There are at many slightly different schemes (and all of them can be
present in the same error backtrace):

path/file.rb:10: error text
path/file.rb:1:in `require': other-path/other-file.rb:31: error text
path/file.rb:7:in `method' error text
^ from path/file.rb:12

And so on. I can't invent one regexp for my output-capturing text editor
(EditPlus on Windows) for catch all cases and automatically extract file
and path for navigate me to this path.

Thanks for the answers.

v.

I can't find the differences. If you want a regexp which gives the name of the
file, I think you can simply use something like:

/^.*(?=:\d+:)/

Stefano
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top