00001 //$Header: /home/ben/Mapper/include/RCS/error.h,v 6.2 2002/07/09 23:03:15 ben Exp $
00002 #ifndef ERROR_H
00003 #define ERROR_H
00004 // Copyright Benedict Adamson 2002.
00005 // This file is part of Mapper.
00006
00007 // Mapper is free software; you can redistribute it and/or modify
00008 // it under the terms of the GNU General Public License as published by
00009 // the Free Software Foundation; either version 2 of the License, or
00010 // (at your option) any later version.
00011
00012 // Mapper is distributed in the hope that it will be useful,
00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00015 // GNU General Public License for more details.
00016
00017 // You should have received a copy of the GNU General Public License
00018 // along with Mapper; if not, write to the Free Software
00019 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
00020
00029 #include <string>
00030 #include <dom/DOM_Element.hpp>
00031
00032
00033
00037 namespace error{
00038
00043 class element_error
00044 {
00045 public:
00046
00050 DOM_Element element;
00051
00055 string message;
00056
00069 inline element_error(
00070 const DOM_Element &e,
00071 const string &m
00072 )
00073 :
00074 element( e ),
00075 message( m )
00076 {
00077 };
00078
00079 };
00080
00081
00082
00087 class attribute_error
00088 :
00089 public element_error
00090 {
00091 public:
00092
00096 string attribute;
00097
00112 attribute_error(
00113 const DOM_Element &e,
00114 const string &m,
00115 const string &a
00116 );
00117
00118 };
00119
00120 };
00121
00122 #endif