]>
git.proxmox.com Git - ceph.git/blob - ceph/src/pybind/mgr/volumes/fs/exception.py
1 class VolumeException(Exception):
2 def __init__(self
, error_code
, error_message
):
3 self
.errno
= error_code
4 self
.error_str
= error_message
7 return self
.errno
, "", self
.error_str
10 return "{0} ({1})".format(self
.errno
, self
.error_str
)
12 class MetadataMgrException(Exception):
13 def __init__(self
, error_code
, error_message
):
14 self
.errno
= error_code
15 self
.error_str
= error_message
18 return "{0} ({1})".format(self
.errno
, self
.error_str
)
20 class IndexException(Exception):
21 def __init__(self
, error_code
, error_message
):
22 self
.errno
= error_code
23 self
.error_str
= error_message
26 return "{0} ({1})".format(self
.errno
, self
.error_str
)
28 class OpSmException(Exception):
29 def __init__(self
, error_code
, error_message
):
30 self
.errno
= error_code
31 self
.error_str
= error_message
34 return "{0} ({1})".format(self
.errno
, self
.error_str
)
36 class NotImplementedException(Exception):
39 class ClusterTimeout(Exception):
41 Exception indicating that we timed out trying to talk to the Ceph cluster,
42 either to the mons, or to any individual daemon that the mons indicate ought
43 to be up but isn't responding to us.
47 class ClusterError(Exception):
49 Exception indicating that the cluster returned an error to a command that
50 we thought should be successful based on our last knowledge of the cluster
53 def __init__(self
, action
, result_code
, result_str
):
55 self
._result
_code
= result_code
56 self
._result
_str
= result_str
59 return "Error {0} (\"{1}\") while {2}".format(
60 self
._result
_code
, self
._result
_str
, self
._action
)
62 class EvictionError(Exception):