mercurial/error.py
changeset 47295 dd339191f2dc
parent 47292 5a75be916316
child 47304 73f52278a158
equal deleted inserted replaced
47294:93a0abe098e7 47295:dd339191f2dc
    89 
    89 
    90 class Abort(Error):
    90 class Abort(Error):
    91     """Raised if a command needs to print an error and exit."""
    91     """Raised if a command needs to print an error and exit."""
    92 
    92 
    93 
    93 
    94 class StorageError(Hint, Exception):
    94 class StorageError(Error):
    95     """Raised when an error occurs in a storage layer.
    95     """Raised when an error occurs in a storage layer.
    96 
    96 
    97     Usually subclassed by a storage-specific exception.
    97     Usually subclassed by a storage-specific exception.
    98     """
    98     """
    99 
    99 
   100     __bytes__ = _tobytes
   100     def __init__(self, message, hint=None):
       
   101         super(StorageError, self).__init__(
       
   102             message, hint=hint, detailed_exit_code=50
       
   103         )
   101 
   104 
   102 
   105 
   103 class RevlogError(StorageError):
   106 class RevlogError(StorageError):
   104     pass
   107     pass
   105 
   108