Better device:add error output (#13913)
* Better device:add error output * for addhost.php too
This commit is contained in:
parent
5d0670cdf6
commit
92354e0a12
|
@ -165,7 +165,7 @@ if (! empty($argv[1])) {
|
|||
}
|
||||
exit(2);
|
||||
} catch (Exception $e) {
|
||||
print_error($e->getMessage());
|
||||
print_error("$e");
|
||||
exit(3);
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -139,7 +139,7 @@ class DeviceAdd extends LnmsCommand
|
|||
return 3;
|
||||
} catch (Exception $e) {
|
||||
// other errors?
|
||||
$this->error(get_class($e) . ': ' . $e->getMessage());
|
||||
$this->error("Error: $e");
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue