Page MenuHomePhabricator

Minor improvement to XHPASTSyntaxErrorException message
ClosedPublic

Authored by joshuaspence on Jul 17 2014, 1:38 PM.
Tags
None
Referenced Files
F22560025: D9961.diff
Thu, Sep 24, 1:49 AM
Unknown Object (File)
Aug 19 2026, 5:17 PM
Unknown Object (File)
Aug 17 2026, 1:15 PM
Unknown Object (File)
Jun 17 2026, 10:52 PM
Unknown Object (File)
Mar 22 2026, 9:33 PM
Unknown Object (File)
Mar 22 2026, 9:28 PM
Unknown Object (File)
Feb 11 2026, 8:23 PM
Unknown Object (File)
Feb 11 2026, 12:00 PM
Subscribers

Details

Summary

Trim trailing newline from exception message.

Test Plan

Before

> ./scripts/phutil_symbols.php test.php
{
  "error" : "XHPAST Parse Error: syntax error, unexpected $end, expecting T_FUNCTION on line 4\n",
  "line"  : "4",
  "file"  : "\/home\/joshua\/workspace\/github.com\/phacility\/libphutil\/foo.php"
}

After

> ./scripts/phutil_symbols.php test.php
{
  "error" : "XHPAST Parse Error: syntax error, unexpected $end, expecting T_FUNCTION on line 4",
  "line"  : "4",
  "file"  : "\/home\/joshua\/workspace\/github.com\/phacility\/libphutil\/foo.php"
}

Diff Detail

Repository
rPHU libphutil
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

joshuaspence retitled this revision from to Minor improvement to XHPASTSyntaxErrorException message.
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence added a reviewer: epriestley.
epriestley edited edge metadata.
This revision is now accepted and ready to land.Jul 17 2014, 2:14 PM