'TAG_TOO_LONG',
'UNBALANCED_FREEZE_THAW',
'UNBALANCED_ATOMIC',
+ 'UNSUPPORTED_OPERATION',
+ 'UPGRADE_REQUIRED',
+ 'PATH_ERROR',
'NOT_INITIALIZED'])
"""STATUS is a class, whose attributes provide constants that serve as return
indicators for notmuch functions. Currently the following ones are defined. For
* TAG_TOO_LONG
* UNBALANCED_FREEZE_THAW
* UNBALANCED_ATOMIC
+ * UNSUPPORTED_OPERATION
+ * UPGRADE_REQUIRED
+ * PATH_ERROR
* NOT_INITIALIZED
Invoke the class method `notmuch.STATUS.status2str` with a status value as
STATUS.TAG_TOO_LONG: TagTooLongError,
STATUS.UNBALANCED_FREEZE_THAW: UnbalancedFreezeThawError,
STATUS.UNBALANCED_ATOMIC: UnbalancedAtomicError,
+ STATUS.UNSUPPORTED_OPERATION: UnsupportedOperationError,
+ STATUS.UPGRADE_REQUIRED: UpgradeRequiredError,
+ STATUS.PATH_ERROR: PathError,
STATUS.NOT_INITIALIZED: NotInitializedError,
}
assert 0 < status <= len(subclasses)
status = STATUS.UNBALANCED_ATOMIC
+class UnsupportedOperationError(NotmuchError):
+ status = STATUS.UNSUPPORTED_OPERATION
+
+
+class UpgradeRequiredError(NotmuchError):
+ status = STATUS.UPGRADE_REQUIRED
+
+
+class PathError(NotmuchError):
+ status = STATUS.PATH_ERROR
+
+
class NotInitializedError(NotmuchError):
"""Derived from NotmuchError, this occurs if the underlying data
structure (e.g. database is not initialized (yet) or an iterator has