|
20 | 20 | Exceptions relating to specific conditions that occur when factoring a model. |
21 | 21 | """ |
22 | 22 |
|
23 | | -from . import CycloneDxException |
| 23 | +__all__ = ['CycloneDxFactoryException', 'LicenseChoiceFactoryException', |
| 24 | + 'InvalidSpdxLicenseException', 'LicenseFactoryException', 'InvalidLicenseExpressionException'] |
24 | 25 |
|
| 26 | +from ..contrib.license.exceptions import ( |
| 27 | + FactoryException as _FactoryException, |
| 28 | + InvalidLicenseExpressionException as _InvalidLicenseExpressionException, |
| 29 | + InvalidSpdxLicenseException as _InvalidSpdxLicenseException, |
| 30 | + LicenseChoiceFactoryException as _LicenseChoiceFactoryException, |
| 31 | + LicenseFactoryException as _LicenseFactoryException, |
| 32 | +) |
25 | 33 |
|
26 | | -class CycloneDxFactoryException(CycloneDxException): |
27 | | - """ |
28 | | - Base exception that covers all exceptions that may be thrown during model factoring.. |
29 | | - """ |
30 | | - pass |
| 34 | +# region deprecated re-export |
31 | 35 |
|
| 36 | +# re-export NOT as inherited class with @deprecated, to keep the original subclassing intact!!1 |
32 | 37 |
|
33 | | -class LicenseChoiceFactoryException(CycloneDxFactoryException): |
34 | | - """ |
35 | | - Base exception that covers all LicenseChoiceFactory exceptions. |
36 | | - """ |
37 | | - pass |
38 | 38 |
|
| 39 | +CycloneDxFactoryException = _FactoryException |
| 40 | +"""Deprecated — Alias of :class:`cyclonedx.contrib.license.exceptions.FactoryException`. |
39 | 41 |
|
40 | | -class InvalidSpdxLicenseException(LicenseChoiceFactoryException): |
41 | | - """ |
42 | | - Thrown when an invalid SPDX License is provided. |
43 | | - """ |
44 | | - pass |
| 42 | +.. deprecated:: next |
| 43 | + This re-export location is deprecated. |
| 44 | + Use ``from cyclonedx.contrib.license.exceptions import FactoryException`` instead. |
| 45 | + The exported symbol itself is NOT deprecated - only this import path. |
| 46 | +""" |
| 47 | + |
| 48 | +LicenseChoiceFactoryException = _LicenseChoiceFactoryException |
| 49 | +"""Deprecated — Alias of :class:`cyclonedx.contrib.license.exceptions.LicenseChoiceFactoryException`. |
| 50 | +
|
| 51 | +.. deprecated:: next |
| 52 | + This re-export location is deprecated. |
| 53 | + Use ``from cyclonedx.contrib.license.exceptions import LicenseChoiceFactoryException`` instead. |
| 54 | + The exported symbol itself is NOT deprecated - only this import path. |
| 55 | +""" |
| 56 | + |
| 57 | +InvalidSpdxLicenseException = _InvalidSpdxLicenseException |
| 58 | +"""Deprecated — Alias of :class:`cyclonedx.contrib.license.exceptions.InvalidSpdxLicenseException`. |
45 | 59 |
|
| 60 | +.. deprecated:: next |
| 61 | + This re-export location is deprecated. |
| 62 | + Use ``from cyclonedx.contrib.license.exceptions import InvalidSpdxLicenseException`` instead. |
| 63 | + The exported symbol itself is NOT deprecated - only this import path. |
| 64 | +""" |
| 65 | + |
| 66 | +LicenseFactoryException = _LicenseFactoryException |
| 67 | +"""Deprecated — Alias of :class:`cyclonedx.contrib.license.exceptions.LicenseFactoryException`. |
46 | 68 |
|
47 | | -class LicenseFactoryException(CycloneDxFactoryException): |
48 | | - """ |
49 | | - Base exception that covers all LicenseFactory exceptions. |
50 | | - """ |
51 | | - pass |
| 69 | +.. deprecated:: next |
| 70 | + This re-export location is deprecated. |
| 71 | + Use ``from cyclonedx.contrib.license.exceptions import LicenseFactoryException`` instead. |
| 72 | + The exported symbol itself is NOT deprecated - only this import path. |
| 73 | +""" |
52 | 74 |
|
| 75 | +InvalidLicenseExpressionException = _InvalidLicenseExpressionException |
| 76 | +"""Deprecated — Alias of :class:`cyclonedx.contrib.license.exceptions.InvalidLicenseExpressionException`. |
| 77 | +
|
| 78 | +.. deprecated:: next |
| 79 | + This re-export location is deprecated. |
| 80 | + Use ``from cyclonedx.contrib.license.exceptions import InvalidLicenseExpressionException`` instead. |
| 81 | + The exported symbol itself is NOT deprecated - only this import path. |
| 82 | +""" |
53 | 83 |
|
54 | | -class InvalidLicenseExpressionException(LicenseFactoryException): |
55 | | - """ |
56 | | - Thrown when an invalid License expressions is provided. |
57 | | - """ |
58 | | - pass |
| 84 | +# endregion deprecated re-export |
0 commit comments