Perl-Critic / PPI

53 stars 44 forks source link

PPI::Exception needs unit tests #152

Open moregan opened 9 years ago

moregan commented 9 years ago

There are currently no tests for PPI::Exception

BillCruise commented 6 years ago

I think it would be good just to see some example code that catches a PPI::Exception and gets the error message from the thrown exception. I can't seem to find any examples online where this is used.

I have a case where a very large file isn't being parsed properly, but I'm not sure why. I just get back an undefined reference from PPI::Document->new.

wchristian commented 6 years ago

The exception object is more of a sketch than a real thing, if i remember correctly.

In the interim, try checking PPI::Document->errstr or PPI::Lexer->errstr.