# -*- coding: iso-8859-1 -*- # Copyright 20003 - 2008: Julien Bourdaillet (julien.bourdaillet@lip6.fr), Jean-Gabriel Ganascia (jean-gabriel.ganascia@lip6.fr) # This file is part of MEDITE. # # MEDITE is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # MEDITE is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Foobar; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #---------------------------------------------------------------------------- # Nom: exceptionsDonnees.py # Objet: Fichier qui regroupe les differentes exceptions utiles dans # l'implementation #---------------------------------------------------------------------------- ## exceptions Oeuvre ## class OeuvreNonTrouvee(Exception): def __init__(self, pMsg): Exception.__init__(self,pMsg) class OeuvreDejaExistante(Exception): def __init__(self, pMsg, pOeuvre): self.__oeuvreExistante = pOeuvre Exception.__init__(self,pMsg) def getOeuvre(self): return self.__oeuvreExistante ## exceptions Auteur ## class AuteurNonTrouve(Exception): def __init__(self, pMsg): Exception.__init__(self,pMsg) class AuteurDejaExistant(Exception): def __init__(self, pMsg, pAuteur): self.__auteurExistant = pAuteur Exception.__init__(self,pMsg) def getAuteur(self): return self.__auteurExistant ## exception Informations ## class InformationsNonTrouvees(Exception): def __init__(self, pMsg): Exception.__init__(self,pMsg) ## exception Transformations ## class TransformationsDejaExistantes(Exception): def __init__(self, pMsg): Exception.__init__(self,pMsg) ## exceptions Commentaire ## class CommentaireNonTrouve(Exception): def __init__(self, pMsg): Exception.__init__(self,pMsg) class CommentaireDejaExistant(Exception): def __init__(self, pMsg, pCommentaire): self.__commentaireExistant = pCommentaire Exception.__init__(self,pMsg) def getCommentaire(self): return self.__commentaireExistant ## exception PlanTravail ## class FichierNonTrouve(Exception): def __init__(self): Exception.__init__(self) ## exception copie de fichier textes # class FichierExistant(Exception): def __init__(self, pSource, pDest): self.__source = pSource self.__dest = pDest msg = u'le fichier ' +pDest+u' existe d\xe9j\xe0' Exception.__init__(self,msg) def getFicSource(self): return self.__source def getFicDest(self): return self.__dest