all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH dart_api_client 1/1] change exception toString to only print details if not null
@ 2025-05-05  7:28 Michael Köppl
  2025-05-05 15:44 ` Shan Shaji
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Michael Köppl @ 2025-05-05  7:28 UTC (permalink / raw)
  To: pve-devel

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



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-06-04 11:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-05  7:28 [pve-devel] [PATCH dart_api_client 1/1] change exception toString to only print details if not null Michael Köppl
2025-05-05 15:44 ` Shan Shaji
2025-05-21 11:04 ` Dominik Csapak
2025-05-23  7:51   ` Michael Köppl
2025-06-04 11:11 ` [pve-devel] applied: " Dominik Csapak

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal