Cannot catch querypath parser errors
- Dominant language
- C++
- Stars
- 18.7k
- Forks
- 3.1k
- Avg merge
- 1h 47m
- Merged PRs (30d)
- 2
Description
### HHVM Version
3.14.0-dev
### Standalone code, or other way to reproduce the problem
```
This is invalid HTML <
HTML;
function errorHandler($errno, $errstr) {
var_dump('handling error', $errno, $errstr);
}
set_error_handler('errorHandler', E_ERROR | E_WARNING | E_USER_ERROR | E_USER_WARNING);
$qp->html($h);
```
### Expected result
In Zend, the error handler gets called 4 times:
```
string(14) "handling error"
int(2)
string(95) "DOMDocumentFragment::appendXML(): Entity: line 1: parser error : StartTag: invalid element name"
string(14) "handling error"
int(2)
string(68) "DOMDocumentFragment::appendXML():
string(14) "handling error"
int(2)
string(62) "DOMDocumentFragment::appendXML(): ^"
string(14) "handling error"
int(2)
string(91) "DOMDocumentFragment::appendXML(): Entity: line 1: parser error : chunk is not well balanced"
```
### Actual result
In HHVM, it gets called 0 times:
```
Entity: line 1: parser error : StartTag: invalid element name
^
Entity: line 1: parser error : chunk is not well balanced
```
Contributor guide
Assessment
This issue has not been assessed yet.