mercurial/error.py
changeset 45776 0fc8b066928a
parent 45775 5bb900885311
child 45825 8f07f5a9c3de
equal deleted inserted replaced
45775:5bb900885311 45776:0fc8b066928a
   221     __bytes__ = _tobytes
   221     __bytes__ = _tobytes
   222 
   222 
   223 
   223 
   224 class ParseError(Hint, Exception):
   224 class ParseError(Hint, Exception):
   225     """Raised when parsing config files and {rev,file}sets (msg[, pos])"""
   225     """Raised when parsing config files and {rev,file}sets (msg[, pos])"""
       
   226 
       
   227     def __init__(self, message, location=None, hint=None):
       
   228         self.message = message
       
   229         self.location = location
       
   230         self.hint = hint
       
   231         # Pass the message and possibly location into the Exception constructor
       
   232         # to help code that looks for exc.args.
       
   233         if location is not None:
       
   234             Exception.__init__(self, message, location)
       
   235         else:
       
   236             Exception.__init__(self, message)
   226 
   237 
   227     __bytes__ = _tobytes
   238     __bytes__ = _tobytes
   228 
   239 
   229 
   240 
   230 class PatchError(Exception):
   241 class PatchError(Exception):