[pve-devel] [PATCH dart_api_client 1/1] change exception toString to only print details if not null
Michael Köppl
m.koeppl at proxmox.com
Mon May 5 09:28:45 CEST 2025
Without this check, the toString method returns '-> null' at the end of
the exception message if there are no details.
Signed-off-by: Michael Köppl <m.koeppl at proxmox.com>
---
lib/src/proxmox_api_exception.dart | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/src/proxmox_api_exception.dart b/lib/src/proxmox_api_exception.dart
index 8dddc7c..5c6f343 100644
--- a/lib/src/proxmox_api_exception.dart
+++ b/lib/src/proxmox_api_exception.dart
@@ -7,6 +7,6 @@ class ProxmoxApiException implements Exception {
@override
String toString() {
- return '$message -> $details';
+ return details != null ? '$message -> $details' : message;
}
}
--
2.39.5
More information about the pve-devel
mailing list