Livestatus\Query: use trigger_error in __toString

This commit is contained in:
Thomas Gelf 2014-11-16 15:37:52 +01:00
parent 510e1e66d6
commit 4b5b5f4ae3
1 changed files with 6 additions and 1 deletions

View File

@ -12,6 +12,7 @@ use Icinga\Data\Filter\FilterExpression;
use Icinga\Data\Filter\FilterOr;
use Icinga\Data\Filter\FilterAnd;
use Icinga\Data\Filter\FilterNot;
use Exception;
class Query extends SimpleQuery
{
@ -75,7 +76,11 @@ class Query extends SimpleQuery
*/
public function __toString()
{
return $this->toString();
try {
return $this->toString();
} catch (Exception $e) {
trigger_error('Exception: ' . $e->getMessage(), E_USER_ERROR);
}
}
/**