MCPcopy Create free account
hub / github.com/nodejs/node / ExceptionGroup

Class ExceptionGroup

tools/gyp/pylib/packaging/metadata.py:30–45  ·  view source on GitHub ↗

A minimal implementation of :external:exc:`ExceptionGroup` from Python 3.11. If :external:exc:`ExceptionGroup` is already defined by Python itself, that version is used instead.

Source from the content-addressed store, hash-verified

28except NameError: # pragma: no cover
29
30 class ExceptionGroup(Exception): # noqa: N818
31 """A minimal implementation of :external:exc:`ExceptionGroup` from Python 3.11.
32
33 If :external:exc:`ExceptionGroup` is already defined by Python itself,
34 that version is used instead.
35 """
36
37 message: str
38 exceptions: List[Exception]
39
40 def __init__(self, message: str, exceptions: List[Exception]) -> None:
41 self.message = message
42 self.exceptions = exceptions
43
44 def __repr__(self) -> str:
45 return f"{self.__class__.__name__}({self.message!r}, {self.exceptions!r})"
46
47else: # pragma: no cover
48 ExceptionGroup = ExceptionGroup

Callers 2

from_rawMethod · 0.85
from_emailMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected