00001
00002 #ifndef MIX_DOMEXCEPTION_H_
00003 #define MIX_DOMEXCEPTION_H_
00004
00005 #include <exception>
00006 #include "misc.h"
00007 #include "classes.h"
00008
00009 namespace MiX{
00010
00011 template <class charT,class char_traits,class xml_traits>
00012 class DOM_Exception : public std::exception{
00013 public:
00014 MiX_Template_Typedef(charT,char_traits,xml_traits);
00015 private:
00016 const node_type* node_;
00017 ErrorType type_;
00018 std::string data_;
00019 public:
00021 DOM_Exception(const node_type* node,ErrorType type,const std::string& data)
00022 : node_(node),type_(type),data_(data){ };
00024 virtual ~DOM_Exception() throw(){ };
00026 const char* what()const throw(){ return data_.c_str(); }
00028 const node_type* getNode()const throw(){ return node_; }
00030 ErrorType getType() const throw() { return type_; };
00031 };
00032 }
00033
00034 #endif