diff options
Diffstat (limited to 'jsonschema/exceptions.py')
-rw-r--r-- | jsonschema/exceptions.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/jsonschema/exceptions.py b/jsonschema/exceptions.py index d1ee50a..2ad9d3c 100644 --- a/jsonschema/exceptions.py +++ b/jsonschema/exceptions.py @@ -11,6 +11,7 @@ import heapq import itertools import warnings +from referencing.exceptions import Unresolvable as _Unresolvable import attr from jsonschema import _utils @@ -210,6 +211,15 @@ class _RefResolutionError(Exception): return str(self._cause) +class _WrappedReferencingError(_RefResolutionError, _Unresolvable): + def __init__(self, cause: _Unresolvable): + object.__setattr__(self, "_cause", cause) + + def __getattribute__(self, attr): + cause = object.__getattribute__(self, "_cause") + return getattr(cause, attr) + + class UndefinedTypeCheck(Exception): """ A type checker was asked to check a type it did not have registered. |