PPI icon indicating copy to clipboard operation
PPI copied to clipboard

PPI::Exception needs unit tests

Open moregan opened this issue 10 years ago • 2 comments

There are currently no tests for PPI::Exception

moregan avatar Dec 24 '14 03:12 moregan

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.

BillCruise avatar Oct 26 '17 14:10 BillCruise

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.

wchristian avatar Oct 26 '17 14:10 wchristian