Better device:add error output (#13913)

* Better device:add error output

* for addhost.php too
This commit is contained in:
Tony Murray 2022-04-12 22:07:01 -05:00 committed by GitHub
parent 5d0670cdf6
commit 92354e0a12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -165,7 +165,7 @@ if (! empty($argv[1])) {
}
exit(2);
} catch (Exception $e) {
print_error($e->getMessage());
print_error("$e");
exit(3);
}
} else {

View File

@ -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;
}