IcingaObject: more details in the error message

This commit is contained in:
Thomas Gelf 2022-09-13 10:20:24 +02:00
parent 1df495b41e
commit 0cf8c76617

View File

@ -565,7 +565,9 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
} catch (NotFoundError $e) {
// Hint: eventually a NotFoundError would be better
throw new RuntimeException(sprintf(
'Unable to load object referenced from %s "%s", %s',
'Unable to load object (%s: %s) referenced from %s "%s", %s',
$short,
$this->unresolvedRelatedProperties[$name],
$this->getShortTableName(),
$this->getObjectName(),
lcfirst($e->getMessage())