exceptions¶
STIX2 Error Classes.
-
exception
AtLeastOnePropertyError(cls, properties)¶ Violating a constraint of a STIX object type that at least one of the given properties must be populated.
-
exception
CustomContentError(msg)¶ Custom STIX Content (SDO, Observable, Extension, etc.) detected.
-
exception
DependentPropertiesError(cls, dependencies)¶ Violating interproperty dependency constraint of a STIX object type.
-
exception
DictionaryKeyError(key, reason)¶ Dictionary key does not conform to the correct format.
-
exception
DuplicateRegistrationError(obj_type, reg_obj_type)¶ A STIX object with the same type as an existing object is being registered
-
exception
ExtraPropertiesError(cls, properties)¶ One or more extra properties were provided when constructing STIX object.
-
exception
ImmutableError(cls, key)¶ Attempted to modify an object after creation.
-
exception
InvalidObjRefError(cls, prop_name, reason)¶ A STIX Cyber Observable Object contains an invalid object reference.
-
exception
InvalidSelectorError(cls, key)¶ Granular Marking selector violation. The selector must resolve into an existing STIX object property.
-
exception
InvalidValueError(cls, prop_name, reason)¶ An invalid value was provided to a STIX object’s
__init__.
-
exception
MarkingNotFoundError(cls, key)¶ Marking violation. The marking reference must be present in SDO or SRO.
-
exception
MissingPropertiesError(cls, properties)¶ Missing one or more required properties when constructing STIX object.
-
exception
MutuallyExclusivePropertiesError(cls, properties)¶ Violating interproperty mutually exclusive constraint of a STIX object type.
-
exception
ObjectConfigurationError¶ Represents specification violations regarding the composition of STIX objects.
-
exception
ObjectNotVersionableError(obj)¶ An object’s type supports versioning, but the object couldn’t be versioned because it lacked sufficient versioning properties.
-
exception
ParseError(msg)¶ Could not parse object.
-
exception
PropertyPresenceError(message, cls)¶ Represents an invalid combination of properties on a STIX object. This class can be used directly when the object requirements are more complicated and none of the more specific exception subclasses apply.
-
exception
RevokeError(called_by)¶ Attempted an operation on a revoked object.
-
exception
STIXDeprecationWarning¶ Represents usage of a deprecated component of a STIX specification.
-
exception
STIXError¶ Base class for errors generated in the stix2 library.
-
exception
TLPMarkingDefinitionError(user_obj, spec_obj)¶ Marking violation. The marking-definition for TLP MUST follow the mandated instances from the spec.
-
exception
TypeNotVersionableError(obj)¶ An object couldn’t be versioned because it lacked the versioning properties and its type does not support them.
-
exception
UnmodifiablePropertyError(unchangable_properties)¶ Attempted to modify an unmodifiable property of object when creating a new version.
-
exception
VersioningError¶ Base class for object versioning errors.