Module modelmage :: Module mmexceptions
[hide private]
[frames] | no frames]

Source Code for Module modelmage.mmexceptions

 1  #-----------------------------------------------# 
 2  #                  modelMaGe                    # 
 3  #                                               # 
 4  #                 v1.0beta September 2009           # 
 5  #       Joerg Schaber, Max Floettmann and Jian Li   # 
 6  #                                               # 
 7  #                http://modelmage.org               # 
 8  #-----------------------------------------------# 
 9  ## @file    mmexceptions.py 
10  ## @brief   Handles raised exceptions. 
11  ## @author  Max Floettmann 
12  ##  
13  ## This file is part of modelMaGe.  Please visit http://modelMaGe.org for more 
14  ## information about modelMaGe, and the latest version of modelMaGe. 
15  ## 
16   
17 -class Error(Exception):
18 """Base class for exceptions in this module.""" 19 pass
20
21 -class InputError(Error):
22 """Exception raised for errors in the input. 23 24 Attributes: 25 expression -- input expression in which the error occurred 26 message -- explanation of the error 27 """ 28
29 - def __init__(self, expression, message):
30 self.expression = expression 31 self.message = message
32
33 -class libSBMLError(Error):
34 """ 35 Exception raised for errors in SBML Files. 36 37 @type type: str 38 @param type: the type of error that occurred 39 """
40 - def __init__(self, type):
41 self.type = type
42
43 -class generatorError(Error):
44 - def __init__(self, type, message):
45 self.type = type 46 self.message = message
47