Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1 

2class CheckerBaseExceptions(Exception): 

3 pass 

4 

5 

6class CheckerException(CheckerBaseExceptions): 

7 def __init__(self, message, *args, **kwargs): 

8 super(CheckerException, self).__init__(message, *args, **kwargs) 

9 # get the trace 

10 # TODO: get and log traceback 

11 

12 # prettify message 

13 self.message = "# CheckerException: {}".format(message) 

14 

15 

16class ConfigException(CheckerException): 

17 def __init__(self, message, *args, **kwargs): 

18 super(ConfigException, self).__init__(message, *args, **kwargs) 

19 self.message = "# Configuration error: {}".format(message) 

20 

21 

22class SaltException(CheckerException): 

23 def __init__(self, message, *args, **kwargs): 

24 super(SaltException, self).__init__(message, *args, **kwargs) 

25 self.message = "# Salt error: {}".format(message) 

26 

27 

28class InvalidReturnException(CheckerException): 

29 def __init__(self, message, *args, **kwargs): 

30 super(InvalidReturnException, self).__init__(message, *args, **kwargs) 

31 self.message = "# Unexpected return value: {}".format(message) 

32 

33 

34class ErrorMappingException(CheckerException): 

35 def __init__(self, message, *args, **kwargs): 

36 super(ErrorMappingException, self).__init__(message, *args, **kwargs) 

37 self.message = "# Unexpected error mapping/type: {}".format(message)