Add some missing docstrings on a few exception classes.

pull/1/head
Michael Chisholm 2020-08-24 17:04:56 -04:00
parent c74d06aadc
commit a97645abc3
1 changed files with 11 additions and 0 deletions

View File

@ -176,6 +176,9 @@ class ImmutableError(STIXError):
class VersioningError(STIXError):
"""
Base class for object versioning errors.
"""
pass
@ -192,6 +195,10 @@ class UnmodifiablePropertyError(VersioningError):
class TypeNotVersionableError(VersioningError):
"""
An object couldn't be versioned because it lacked the versioning properties
and its type does not support them.
"""
def __init__(self, obj):
if isinstance(obj, dict):
type_name = obj.get("type")
@ -209,6 +216,10 @@ class TypeNotVersionableError(VersioningError):
class ObjectNotVersionableError(VersioningError):
"""
An object's type supports versioning, but the object couldn't be versioned
because it lacked sufficient versioning properties.
"""
def __init__(self, obj):
self.object = obj