cyclonedx.exception.model

Exceptions relating to specific conditions that occur when modelling CycloneDX BOM.

Module Contents

exception cyclonedx.exception.model.CycloneDxModelException

Bases: cyclonedx.exception.CycloneDxException

Base exception that covers all exceptions that may be thrown during model creation.

class args
add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception cyclonedx.exception.model.InvalidValueException

Bases: CycloneDxModelException

Base exception that covers all exceptions that may be thrown during model creation.

class args
add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception cyclonedx.exception.model.InvalidLocaleTypeException

Bases: CycloneDxModelException

Raised when the supplied locale does not conform to ISO-639 specification.

Good examples:
  • en

  • en-US

  • en-GB

  • fr

  • fr-CA

The language code MUST be lowercase. If the country code is specified, the country code MUST be upper case. The language code and country code MUST be separated by a minus sign.

class args
add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception cyclonedx.exception.model.InvalidNistQuantumSecurityLevelException

Bases: CycloneDxModelException

Raised when an invalid value is provided for an NIST Quantum Security Level as defined at https://csrc.nist.gov/projects/post-quantum-cryptography/post-quantum-cryptography-standardization/ evaluation-criteria/security-(evaluation-criteria).

class args
add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception cyclonedx.exception.model.InvalidOmniBorIdException

Bases: CycloneDxModelException

Raised when a supplied value for an OmniBOR ID does not meet the format requirements as defined at https://www.iana.org/assignments/uri-schemes/prov/gitoid.

class args
add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception cyclonedx.exception.model.InvalidRelatedCryptoMaterialSizeException

Bases: CycloneDxModelException

Raised when the supplied size of a Related Crypto Material is negative.

class args
add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception cyclonedx.exception.model.InvalidSwhidException

Bases: CycloneDxModelException

Raised when a supplied value for an Swhid does not meet the format requirements as defined at https://docs.softwareheritage.org/devel/swh-model/persistent-identifiers.html.

class args
add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception cyclonedx.exception.model.InvalidUriException

Bases: CycloneDxModelException

Raised when a str is provided that needs to be a valid URI, but isn’t.

class args
add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception cyclonedx.exception.model.MutuallyExclusivePropertiesException

Bases: CycloneDxModelException

Raised when mutually exclusive properties are provided.

class args
add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception cyclonedx.exception.model.NoPropertiesProvidedException

Bases: CycloneDxModelException

Raised when attempting to construct a model class and providing NO values (where all properites are defined as Optional, but at least one is required).

class args
add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception cyclonedx.exception.model.UnknownComponentDependencyException

Bases: CycloneDxModelException

Exception raised when a dependency has been noted for a Component that is NOT a Component BomRef in this Bom.

class args
add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception cyclonedx.exception.model.UnknownHashTypeException

Bases: CycloneDxModelException

Exception raised when we are unable to determine the type of hash from a composite hash string.

class args
add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception cyclonedx.exception.model.LicenseExpressionAlongWithOthersException

Bases: CycloneDxModelException

Exception raised when a LicenseExpression was detected along with other licenses. If a LicenseExpression exists, than it must stand alone.

See https://github.com/CycloneDX/specification/pull/205

class args
add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception cyclonedx.exception.model.InvalidCreIdException

Bases: CycloneDxModelException

Raised when a supplied value for an CRE ID does not meet the format requirements as defined at https://opencre.org/

class args
add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception cyclonedx.exception.model.InvalidConfidenceException

Bases: CycloneDxModelException

Raised when an invalid value is provided for a Confidence. The confidence of the evidence from 0 - 1, where 1 is 100% confidence.

class args
add_note()

Exception.add_note(note) – add a note to the exception

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.