From 92354e0a12b6d77ab36f5dda12e3d4370a60fc46 Mon Sep 17 00:00:00 2001 From: Tony Murray Date: Tue, 12 Apr 2022 22:07:01 -0500 Subject: [PATCH] Better device:add error output (#13913) * Better device:add error output * for addhost.php too --- addhost.php | 2 +- app/Console/Commands/DeviceAdd.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addhost.php b/addhost.php index af9c4518ab..741b523c91 100755 --- a/addhost.php +++ b/addhost.php @@ -165,7 +165,7 @@ if (! empty($argv[1])) { } exit(2); } catch (Exception $e) { - print_error($e->getMessage()); + print_error("$e"); exit(3); } } else { diff --git a/app/Console/Commands/DeviceAdd.php b/app/Console/Commands/DeviceAdd.php index f8074527fa..a3478b96ad 100644 --- a/app/Console/Commands/DeviceAdd.php +++ b/app/Console/Commands/DeviceAdd.php @@ -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; }