Exception Attributes
BaseExceptionGroup.message — exception attribute
Inspect the original message supplied to an exception group. This read-only string is independent of the formatted representation, which also describes the number of child exceptions. Splitting a group preserves its message.
Formal Syntax & Structure
python syntaxpython
group.messageReturn Value
str
The group label.
Working Example
Example Snippetpython
group = ExceptionGroup("validation", [ValueError("quantity"), TypeError("price")])print(group.message)print(str(group))