mirror of https://github.com/status-im/nim-eth.git
19 lines
602 B
Nim
19 lines
602 B
Nim
type
|
|
StorageError* = object of CatchableError
|
|
|
|
template raiseStorageInitError* =
|
|
raise newException(StorageError, "failure to initialize storage")
|
|
|
|
template raiseKeyReadError*(key: auto) =
|
|
raise newException(StorageError, "failed to read key " & $key)
|
|
|
|
template raiseKeyWriteError*(key: auto) =
|
|
raise newException(StorageError, "failed to write key " & $key)
|
|
|
|
template raiseKeySearchError*(key: auto) =
|
|
raise newException(StorageError, "failure during search for key " & $key)
|
|
|
|
template raiseKeyDeletionError*(key: auto) =
|
|
raise newException(StorageError, "failure to delete key " & $key)
|
|
|