PPI
PPI copied to clipboard
PPI::Exception needs unit tests
There are currently no tests for PPI::Exception
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.
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.