Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#670 error line parser is not working for stacktraces

v0.5.x
open
nobody
None
5
2014-04-21
2014-04-16
Sergiy Zuban
No

Stack backtraces produced with Carp::confess doesn't have dot at the end of a line.
As a result references are not parsed (only the 1st line works, because it has dot).

use Carp;

sub x {
    Carp::confess;
}

sub z {
    x();
}

z();

Output

 at test.pl line 42.
    main::x() called at /home/sergiy/work/ts/3.pl line 47
    main::z() called at /home/sergiy/work/ts/3.pl line 50

The ParsedErrorLine.errorLineNoPattern regexp needs to be fixed to make non-digits at the end of line optional:

https://github.com/jploski/epic-ide/blob/testing/org.epic.perleditor/src/org/epic/perleditor/editors/util/PerlValidatorBase.java#L384

Discussion

  • Sergiy Zuban
    Sergiy Zuban
    2014-04-21

    Regexp should be non-greedy, because currently parser is not working for errors like this:

    Can't use an undefined value as a HASH reference at file.pl line 180, <GEN0> line 49.
    

    I assume it matches "file.pl line 180, <GEN0>" as script name instead of just "file.pl".

     
    Last edit: Sergiy Zuban 2014-04-21
  • Jan Ploski
    Jan Ploski
    2014-04-21

    The location in code you're referencing is not relevant, but the bug is now fixed in Git repository.

     
  • Sergiy Zuban
    Sergiy Zuban
    2014-04-21

    Perfect!

    What about regexp greediness? \S+? should fix the 2nd issue (reported today).

     
    • Jan Ploski
      Jan Ploski
      2014-04-21

      I tested with an error message similar to yours and did not see any issues (the hyperlink to line shown in Console view looked and worked as expected).

       
  • Sergiy Zuban
    Sergiy Zuban
    2014-04-21

    Confirmed. You fix solved 2nd issue as well. Thank you.