utilException.h

Go to the documentation of this file.
00001 /* -*- Mode: c++ -*- */
00002 /*
00003  *  this is part of Spm
00004  *
00005  *  Copyright (c) 2006 Guillaume Chevallereau
00006  *
00007  *  This program is free software. You can redistribute it and/or modify it 
00008  *  under the terms of the GNU General Public License as published by the 
00009  *  Free Software Foundation. Either version 2 of the license or (at your 
00010  *  option) any later version.
00011  *
00012  *  This program is distributed in the hope that it will be usefull but WITHOUT
00013  *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
00014  *  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for 
00015  *  more details.
00016  *
00017  *  You should have received a copy of the GNU General Public License along 
00018  *  with this program; if not, write to the Free Software Foundation, Inc., 
00019  *  59 Temple Place - Suite 330, Boston, MA  02111-1307, USA
00020  */
00021 #ifndef __UTIL_EXCEPTION_H__
00022 #define __UTIL_EXCEPTION_H__
00023 
00024 #include <miniXml/ustring.h>
00025 
00026 namespace Spm
00027 {
00028   class Exception 
00029   {
00030   protected :
00031     miniXml::ustring errMsg_;
00032     Exception ();
00033   public :
00034     const miniXml::ustring & what ()
00035     {
00036       return errMsg_;
00037     }
00038   };
00039 
00040   namespace Util
00041   {
00042     class UnknownUserException : public Spm::Exception
00043     {
00044     public:
00045       UnknownUserException (const miniXml::ustring & userName);
00046     };
00047     
00048     class NullPointerException : public Spm::Exception
00049     {
00050     public :
00051       NullPointerException (const miniXml::ustring & file,
00052                             unsigned short line);
00053     };
00054     
00055     class ArchiveException : public Spm::Exception
00056     {
00057     public :
00058       ArchiveException (const miniXml::ustring & archive,
00059                         const miniXml::ustring & error);
00060     };
00061 
00062     class NoPropertyException : public Exception
00063     {
00064     public:
00065       NoPropertyException (const miniXml::ustring & propertyName);
00066     };
00067     
00068     class BadPropertyTypeException : public Exception
00069     {
00070     public:
00071       BadPropertyTypeException (const miniXml::ustring & propertyName,
00072                                 const miniXml::ustring & expectedPropertyType,
00073                                 const miniXml::ustring & realPropertyType);
00074     };
00075 
00076     class ExistingPropertyException : public Exception 
00077     {
00078     public:
00079       ExistingPropertyException (const miniXml::ustring & propertyName);
00080     };
00081   }
00082 }
00083 
00084 #endif

Generated on Sat Mar 21 17:00:14 2009 for libSpm by  doxygen 1.5.2