Advertisement
Guest User

Untitled

a guest
Jul 28th, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.58 KB | None | 0 0
  1. class MyException(Exception):
  2.     __metaclass__ = ABCMeta
  3.     ## $constructor
  4.     def __init__(self, value):
  5.         ## @var self.__subReason a more detailed reason for the exception
  6.         self.subReason = value
  7. .
  8. .
  9.  
  10. class OptionSectionException(MyException):
  11.     ## the constructor
  12.     def __init__(self, value):
  13.         MyException.__init__(self, value)
  14. .
  15. .
  16.     def getMessage(self):
  17.         return 'Problem during parsing the required section [OPTION]: ' + self.subReason <-----
  18.  
  19. --->AttributeError: type object 'OptionSectionException' has no attribute 'subReason'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement