2060a5353cd0dfcb433d700f0abccc386ba11b61
[bertos.git] / wizard / DefineException.py
1 #!/usr/bin/env python
2 # encoding: utf-8
3 #
4 # Copyright 2009 Develer S.r.l. (http://www.develer.com/)
5 # All rights reserved.
6 #
7 # $Id:$
8 #
9 # Author: Lorenzo Berni <duplo@develer.com>
10 #
11
12
13 class DefineException(Exception):
14     """
15     Exception raised when an error occurs parsing the module informations.
16     """
17     def __init__(self, path, line_number, line):
18         self.path = path
19         self.line_number = line_number
20         self.line = line
21     
22     def __str__(self):
23         return repr(self.path)
24
25 class ModuleDefineException(DefineException):
26     """
27     Exception raised when an error occurs parsing the module informations.
28     """
29     def __init__(self, path, line_number, line):
30         super(ModuleDefineException, self).__init__(path, line_number, line)
31
32 class EnumDefineException(DefineException):
33     """
34     Exception raised when an error occurs parsing the enum informations.
35     """
36     def __init__(self, path, line_number, line):
37         super(EnumDefineException, self).__init__(path, line_number, line)
38
39 class ConfigurationDefineException(DefineException):
40     """
41     Exception raised when an error occurs parsing the configuration parameter informations.
42     """
43     def __init__(self, path, line_number, line):
44         super(ConfigurationDefineException, self).__init__(path, line_number, line)