Page MenuHomePhabricator

Minor improvement to XHPASTSyntaxErrorException message
ClosedPublic

Authored by joshuaspence on Jul 17 2014, 1:38 PM.
Tags
None
Referenced Files
Unknown Object (File)
May 8 2025, 5:59 AM
Unknown Object (File)
May 6 2025, 5:32 PM
Unknown Object (File)
May 3 2025, 8:21 AM
Unknown Object (File)
Apr 27 2025, 8:39 PM
Unknown Object (File)
Apr 27 2025, 8:26 PM
Unknown Object (File)
Apr 27 2025, 5:45 PM
Unknown Object (File)
Apr 12 2025, 10:57 PM
Unknown Object (File)
Mar 14 2025, 9:10 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