Skip to content

Commit 5f5dfe4

Browse files
author
Val Brodsky
committed
Cleanup exception printing for LabelboxError
1 parent 7994c48 commit 5f5dfe4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

libs/labelbox/src/labelbox/exceptions.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ def __init__(self, message, cause=None):
1616
self.cause = cause
1717

1818
def __str__(self):
19-
return self.message + str(self.args)
19+
exception_message = self.message
20+
if self.cause is not None:
21+
exception_message += " (caused by: %s)" % self.cause
22+
return exception_message
2023

2124

2225
class AuthenticationError(LabelboxError):

0 commit comments

Comments
 (0)