Package medite :: Package Utile :: Module exceptionsDonnees
[hide private]
[frames] | no frames]

Source Code for Module medite.Utile.exceptionsDonnees

 1  # -*- coding: iso-8859-1 -*- 
 2  # Copyright 20003 - 2008: Julien Bourdaillet (julien.bourdaillet@lip6.fr), Jean-Gabriel Ganascia (jean-gabriel.ganascia@lip6.fr) 
 3  # This file is part of MEDITE. 
 4  # 
 5  #    MEDITE is free software; you can redistribute it and/or modify 
 6  #    it under the terms of the GNU General Public License as published by 
 7  #    the Free Software Foundation; either version 2 of the License, or 
 8  #    (at your option) any later version. 
 9  # 
10  #    MEDITE is distributed in the hope that it will be useful, 
11  #    but WITHOUT ANY WARRANTY; without even the implied warranty of 
12  #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
13  #    GNU General Public License for more details. 
14  # 
15  #    You should have received a copy of the GNU General Public License 
16  #    along with Foobar; if not, write to the Free Software 
17  #    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA 
18  #---------------------------------------------------------------------------- 
19  # Nom:          exceptionsDonnees.py 
20  # Objet:        Fichier qui regroupe les differentes exceptions utiles dans 
21  #               l'implementation 
22  #---------------------------------------------------------------------------- 
23   
24  ## exceptions Oeuvre ## 
25 -class OeuvreNonTrouvee(Exception):
26 - def __init__(self, pMsg):
27 Exception.__init__(self,pMsg)
28 29
30 -class OeuvreDejaExistante(Exception):
31 - def __init__(self, pMsg, pOeuvre):
32 self.__oeuvreExistante = pOeuvre 33 Exception.__init__(self,pMsg)
34
35 - def getOeuvre(self):
36 return self.__oeuvreExistante
37 38 39 40 ## exceptions Auteur ##
41 -class AuteurNonTrouve(Exception):
42 - def __init__(self, pMsg):
43 Exception.__init__(self,pMsg)
44 45
46 -class AuteurDejaExistant(Exception):
47 - def __init__(self, pMsg, pAuteur):
48 self.__auteurExistant = pAuteur 49 Exception.__init__(self,pMsg)
50
51 - def getAuteur(self):
52 return self.__auteurExistant
53 54 55 ## exception Informations ##
56 -class InformationsNonTrouvees(Exception):
57 - def __init__(self, pMsg):
58 Exception.__init__(self,pMsg)
59 60 ## exception Transformations ##
61 -class TransformationsDejaExistantes(Exception):
62 - def __init__(self, pMsg):
63 Exception.__init__(self,pMsg)
64 65 ## exceptions Commentaire ##
66 -class CommentaireNonTrouve(Exception):
67 - def __init__(self, pMsg):
68 Exception.__init__(self,pMsg)
69
70 -class CommentaireDejaExistant(Exception):
71 - def __init__(self, pMsg, pCommentaire):
72 self.__commentaireExistant = pCommentaire 73 Exception.__init__(self,pMsg)
74
75 - def getCommentaire(self):
76 return self.__commentaireExistant
77 78 ## exception PlanTravail ##
79 -class FichierNonTrouve(Exception):
80 - def __init__(self):
81 Exception.__init__(self)
82 83 ## exception copie de fichier textes #
84 -class FichierExistant(Exception):
85 - def __init__(self, pSource, pDest):
86 self.__source = pSource 87 self.__dest = pDest 88 msg = u'le fichier ' +pDest+u' existe d\xe9j\xe0' 89 Exception.__init__(self,msg)
90
91 - def getFicSource(self):
92 return self.__source
93
94 - def getFicDest(self):
95 return self.__dest
96