Compare commits

...
1 Commits
Author SHA1 Message Date
Oliver BrowneandGitHub 5a7f324a61 fix(err): always safe_str exception values (#267)
* always safe_str

* bump version
2025-06-19 14:38:17 +00:00
3 changed files with 9 additions and 3 deletions
+4
View File
@@ -1,3 +1,7 @@
# 5.3.0 - 2025-06-19
- fix: safely handle exception values
# 5.2.0 - 2025-06-19
- feat: construct artificial stack traces if no traceback is available on a captured exception
+4 -2
View File
@@ -438,12 +438,14 @@ def get_errno(exc_value):
def get_error_message(exc_value):
# type: (Optional[BaseException]) -> str
return (
message = (
getattr(exc_value, "message", "")
or getattr(exc_value, "detail", "")
or safe_str(exc_value)
or exc_value
)
return safe_str(message)
def single_exception_from_error_tuple(
exc_type, # type: Optional[type]
+1 -1
View File
@@ -1,4 +1,4 @@
VERSION = "5.2.0"
VERSION = "5.3.0"
if __name__ == "__main__":
print(VERSION, end="") # noqa: T201