-
Notifications
You must be signed in to change notification settings - Fork 56
/
exceptions.py
44 lines (33 loc) · 1.08 KB
/
exceptions.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
from jsonschema import ValidationError
__all__ = [
"AsdfConversionWarning",
"AsdfDeprecationWarning",
"AsdfProvisionalAPIWarning",
"AsdfWarning",
"DelimiterNotFoundError",
"ValidationError",
]
class AsdfWarning(Warning):
"""
The base warning class from which all ASDF warnings should inherit.
"""
class AsdfDeprecationWarning(AsdfWarning, DeprecationWarning):
"""
A warning class to indicate a deprecated feature.
"""
class AsdfConversionWarning(AsdfWarning):
"""
Warning class used for failures to convert data into custom types.
"""
class DelimiterNotFoundError(ValueError):
"""
Indicates that a delimiter was not found when reading or
seeking through a file.
"""
class AsdfProvisionalAPIWarning(AsdfWarning, FutureWarning):
"""
Used for provisional features where breaking API changes might be
introduced at any point (including minor releases). These features
are likely to be added in a future ASDF version. However, Use of
provisional features is highly discouraged for production code.
"""