Merge remote-tracking branch 'origin/support/2.7' into support/3.0

# Conflicts:
#	setup/modelfactory.class.inc.php
#	setup/setuputils.class.inc.php
This commit is contained in:
Pierre Goiffon
2024-03-13 09:27:06 +01:00
3 changed files with 27 additions and 7 deletions

View File

@@ -2037,8 +2037,16 @@ class RestUtils
elseif (is_string($key))
{
// OQL
$oSearch = DBObjectSearch::FromOQL($key);
}
try {
$oSearch = DBObjectSearch::FromOQL($key);
} catch (Exception $e) {
throw new CoreOqlException('Query failed to execute', [
'query' => $key,
'exception_class' => get_class($e),
'exception_message' => $e->getMessage(),
]);
}
}
else
{
throw new Exception("Wrong format for key");