mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-09-25 18:59:04 +02:00
Don't silenty ignore duplicate errors when managing Panes/Dashlets
This commit is contained in:
parent
a118831b38
commit
12af0d2ce1
@ -242,8 +242,13 @@ class DashboardHome extends BaseDashboard implements Sortable
|
||||
'priority' => $movePane ? $order++ : $pane->getPriority()
|
||||
], $filterCondition);
|
||||
} else {
|
||||
// Failed to move the pane! Should have been handled already by the caller
|
||||
break;
|
||||
// Failed to move the pane! Should have already been handled by the caller,
|
||||
// though I think it's better that we raise an exception here!!
|
||||
throw new \LogicException(sprintf(
|
||||
'Dashboard Pane "%s" could not be managed. Dashboard Home "%s" has Pane with the same name!',
|
||||
$pane->getTitle(),
|
||||
$this->getTitle()
|
||||
));
|
||||
}
|
||||
|
||||
$pane->setHome($this);
|
||||
|
@ -236,8 +236,13 @@ class Pane extends BaseDashboard implements Sortable
|
||||
'disabled' => DBUtils::bool2BoolEnum($dashlet->isDisabled())
|
||||
], $filterCondition);
|
||||
} else {
|
||||
// This should have already been handled by the caller
|
||||
break;
|
||||
// Failed to move the pane! Should have already been handled by the caller,
|
||||
// though I think it's better that we raise an exception here!!
|
||||
throw new \LogicException(sprintf(
|
||||
'Dashlet "%s" could not be managed. Dashboard Pane "%s" has a Dashlet with the same name!',
|
||||
$dashlet->getTitle(),
|
||||
$this->getTitle()
|
||||
));
|
||||
}
|
||||
|
||||
$dashlet->setPane($this);
|
||||
|
Loading…
x
Reference in New Issue
Block a user