HomePhabricator

Improve XHPAST handling of syntax errors

Description

Improve XHPAST handling of syntax errors

Summary: Currently, a bunch of developers are using XHPAST for writing custom linter rules. As such, we end up with a fair few XHPASTSyntaxErrorException in our PHP error logs. I think that throwing an exception is not quite correct in this case because it is somewhat expected that invalid PHP may be entered. Instead, catch the exception and show the user a helpful message.

Test Plan: This doesn't quite work yet... the stream and tree views render as blank but the exceptions still propogate to the error logs. Mostly, I'm not sure how the exception should be rendered for display.

Reviewers: epriestley, Blessed Reviewers

Reviewed By: epriestley, Blessed Reviewers

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14028

Details

Provenance
joshuaspenceAuthored on
joshuaspencePushed on Nov 8 2015, 8:03 PM
Reviewer
Blessed Reviewers
Differential Revision
D14028: Improve XHPAST handling of syntax errors
Parents
rPc3ecea9788c1: Add mail support to PhameBlog
Branches
Unknown
Tags
Unknown
Build Status
Buildable 8717
Build 10119: Run Core Tests