mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 08:45:12 +02:00
Improve error messages while saving a new Agent entity
This commit is contained in:
parent
9fb7074082
commit
b88609ca2e
@ -219,8 +219,19 @@ class Agent extends Entity
|
|||||||
|
|
||||||
if ($rs === false) {
|
if ($rs === false) {
|
||||||
global $config;
|
global $config;
|
||||||
|
$error = $config['dbconnection']->error;
|
||||||
|
if (empty($error) === true) {
|
||||||
|
if (empty($updates['intervalo']) === true) {
|
||||||
|
$error = 'Missing agent interval';
|
||||||
|
} else if (empty($updates['id_group']) === true) {
|
||||||
|
$error = 'Missing id_group';
|
||||||
|
} else if (empty($updates['id_group']) === true) {
|
||||||
|
$error = 'Missing id_group';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
throw new \Exception(
|
throw new \Exception(
|
||||||
__METHOD__.' error: '.$config['dbconnection']->error
|
__METHOD__.' error: '.$error
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user