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)
Wed, Jan 1, 1:59 PM
Unknown Object (File)
Thu, Dec 26, 1:19 PM
Unknown Object (File)
Sat, Dec 21, 3:19 PM
Unknown Object (File)
Tue, Dec 17, 2:58 PM
Unknown Object (File)
Dec 6 2024, 1:36 PM
Unknown Object (File)
Dec 5 2024, 8:03 AM
Unknown Object (File)
Dec 3 2024, 2:21 PM
Unknown Object (File)
Dec 3 2024, 1:39 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