Skip to content
Snippets Groups Projects
Select Git revision
  • 5ed34c1d448da9702ff8c4eff87b32d7953a5ea9
  • master default
  • trunk
  • RELEASE_6_5_DRIVEDB
  • RELEASE_6_6_DRIVEDB
  • RELEASE_7_0_DRIVEDB
  • RELEASE_7_2_DRIVEDB
  • RELEASE_7_3_DRIVEDB
  • RELEASE_6_0_DRIVEDB
  • RELEASE_6_1_DRIVEDB
  • RELEASE_6_2_DRIVEDB
  • RELEASE_6_3_DRIVEDB
  • RELEASE_6_4_DRIVEDB
  • tags/RELEASE_7_4
  • tags/RELEASE_7_3
  • RELEASE_5_41_DRIVEDB
  • RELEASE_5_42_DRIVEDB
  • RELEASE_5_43_DRIVEDB
  • tags/RELEASE_7_2
  • tags/RELEASE_7_1
  • tags/RELEASE_7_0
  • RELEASE_5_40_DRIVEDB
22 results

cvs-script

Blame
  • exceptions.py 1.35 KiB
    from __future__ import absolute_import
    from __future__ import division
    from __future__ import print_function
    from __future__ import unicode_literals
    
    import pykat.external.six as six
    if six.PY2:
    	import exceptions
    import os
    
    class BasePyKatException(Exception):
        def __init__(self, msg):
            self.__msg = msg
            
        def __str__(self):
            return self.__msg
    
    class FinesseParse(BasePyKatException) :    
        def __init__(self, msg):
            BasePyKatException.__init__(self, "Error parsing Finesse input\n{0}".format(msg))
        
    class MissingFinesseEnvVar(BasePyKatException) :    
        def __init__(self):
            BasePyKatException.__init__(self, "The environment variable FINESSE_DIR was not defined")
    
    class MissingFinesse(BasePyKatException) :    
        def __init__(self):
            BasePyKatException.__init__(self, "Could not find the finesse executable 'kat' in '{0}'," \
                                         "or you do not have the permissions to run it." \
                                          .format(os.environ.get('FINESSE_DIR')))
        
    class FinesseRunError(BasePyKatException) :
        def __init__(self, err, kat):
            self.__err = err
            self.__kat = kat
            
            BasePyKatException.__init__(self, "Finesse error (file {1}):\n{0}".format(self.__err, self.__kat))
            #BasePyKatException.__init__(self, "{0}".format(self.__err))