Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
class ObjectStateError(Exception):
pass
+class LogicError(Exception):
+ pass
+
def make_ex(ret, msg):
ret = abs(ret)
if (ret == errno.EPERM):
raise IncompleteWriteError("Wrote only %ld out of %ld bytes" % \
(ret, length))
else:
- raise make_ex("Ioctx.write(%s): logic error: rados_write \
+ raise LogicError("Ioctx.write(%s): rados_write \
returned %d, but %d was the maximum number of bytes it could have \
written." % (self.name, ret, length))