Show
Ignore:
Timestamp:
01/11/08 19:08:24 (16 years ago)
Author:
jerome
Message:

Moved all exceptions definitions to a dedicated module.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/pykota/tool.py

    r3287 r3288  
    3939from mx import DateTime 
    4040 
     41from pykota.errors import PyKotaCommandLineError 
    4142from pykota import config, storage, logger 
    4243from pykota.version import __version__, __author__, __years__, __gplblurb__ 
     
    4647    return message 
    4748 
    48 class PyKotaToolError(Exception): 
    49     """An exception for PyKota related stuff.""" 
    50     def __init__(self, message = ""): 
    51         self.message = message 
    52         Exception.__init__(self, message) 
    53     def __repr__(self): 
    54         return self.message.encode(sys.stdout.encoding or "UTF-8", "replace") 
    55     __str__ = __repr__ 
    56      
    57 class PyKotaCommandLineError(PyKotaToolError) :     
    58     """An exception for Pykota command line tools.""" 
    59     pass 
    60      
    6149def crashed(message="Bug in PyKota") :     
    6250    """Minimal crash method."""