Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15390853
D12285.id29488.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D12285.id29488.diff
View Options
diff --git a/src/parser/xhpast/api/XHPASTTree.php b/src/parser/xhpast/api/XHPASTTree.php
--- a/src/parser/xhpast/api/XHPASTTree.php
+++ b/src/parser/xhpast/api/XHPASTTree.php
@@ -35,7 +35,8 @@
$tree = XHPASTTree::newFromData($string);
$statements = $tree->getRootNode()->selectDescendantsOfType('n_STATEMENT');
if (count($statements) != 1) {
- throw new Exception('String does not parse into exactly one statement!');
+ throw new Exception(
+ pht('String does not parse into exactly one statement!'));
}
// Return the first one, trying to use reset() with iterators ends in tears.
foreach ($statements as $statement) {
@@ -59,12 +60,16 @@
throw new XHPASTSyntaxErrorException($matches[2], trim($stderr));
}
}
- throw new Exception("XHPAST failed to parse file data {$err}: {$stderr}");
+ throw new Exception(
+ pht(
+ 'XHPAST failed to parse file data %d: %s',
+ $err,
+ $stderr));
}
$data = json_decode($stdout, true);
if (!is_array($data)) {
- throw new Exception('XHPAST: failed to decode tree.');
+ throw new Exception(pht('XHPAST: failed to decode tree.'));
}
return new XHPASTTree($data['tree'], $data['stream'], $php_source);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Mar 16, 7:04 AM (3 w, 6 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7706494
Default Alt Text
D12285.id29488.diff (1 KB)
Attached To
Mode
D12285: `pht`ize some strings
Attached
Detach File
Event Timeline
Log In to Comment