diff --git a/pages/run_query.php b/pages/run_query.php index 55603d025e..9fa76b01f0 100644 --- a/pages/run_query.php +++ b/pages/run_query.php @@ -131,9 +131,16 @@ try { $oFilter = DBObjectSearch::FromOQL($sExpression); } - catch(OqlException $e) + catch(Exception $e) { - $sSyntaxError = $e->getHtmlDesc(); + if ($e instanceof OqlException) + { + $sSyntaxError = $e->getHtmlDesc(); + } + else + { + $sSyntaxError = $e->getMessage(); + } } if ($oFilter) @@ -159,7 +166,7 @@ try } } - $oP->add("