mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-28 00:04:05 +02:00
Import: Improve exception info during storing rows
This commit is contained in:
parent
35318396e8
commit
58c0689005
@ -301,12 +301,20 @@ class Import
|
|||||||
}
|
}
|
||||||
|
|
||||||
foreach ($newRows as $row) {
|
foreach ($newRows as $row) {
|
||||||
$db->insert('imported_row', $rows[$row]);
|
try {
|
||||||
foreach ($this->rowProperties[$row] as $property) {
|
$db->insert('imported_row', $rows[$row]);
|
||||||
$db->insert('imported_row_property', array(
|
foreach ($this->rowProperties[$row] as $property) {
|
||||||
'row_checksum' => $this->quoteBinary($row),
|
$db->insert('imported_row_property', array(
|
||||||
'property_checksum' => $property
|
'row_checksum' => $this->quoteBinary($row),
|
||||||
));
|
'property_checksum' => $property
|
||||||
|
));
|
||||||
|
}
|
||||||
|
} catch (Exception $e) {
|
||||||
|
throw new IcingaException(
|
||||||
|
"Error while storing a row for '%s' into database: %s",
|
||||||
|
$rows[$row]['object_name'],
|
||||||
|
$e->getMessage()
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user