shep/shep/error.py

41 lines
837 B
Python
Raw Permalink Normal View History

2022-01-31 09:32:48 +01:00
class StateExists(Exception):
2022-02-09 18:30:41 +01:00
"""Attempt to add state that already exists.
"""
2022-01-31 09:32:48 +01:00
pass
2022-01-31 09:38:14 +01:00
class StateInvalid(Exception):
2022-02-09 18:30:41 +01:00
"""Attempt to operate on or move to a state that does not exist.
"""
2022-01-31 09:38:14 +01:00
pass
2022-01-31 12:23:51 +01:00
class StateItemExists(Exception):
2022-02-09 18:30:41 +01:00
"""A content key attempted added that already exists.
"""
2022-01-31 12:23:51 +01:00
pass
class StateItemNotFound(Exception):
2022-02-09 18:30:41 +01:00
"""A content key attempted read that does not exist.
"""
2022-01-31 12:23:51 +01:00
pass
class StateCorruptionError(RuntimeError):
2022-02-09 18:30:41 +01:00
"""An irrecoverable discrepancy between persisted state and memory state has occurred.
"""
2022-01-31 12:23:51 +01:00
pass
2022-03-11 11:31:08 +01:00
class StateTransitionInvalid(Exception):
"""Raised if state transition verification fails
"""
pass
class StateLockedKey(Exception):
"""Attempt to write to a state key that is being written to by another client
"""
pass