00001 #ifndef DVXMLSRV_EXCEPTION_H 00002 #define DVXMLSRV_EXCEPTION_H 00003 // $Id: exception.h,v 1.2 2008/01/07 14:45:20 dvermeir Exp $ 00004 00005 #include <string> 00006 #include <stdexcept> 00007 00008 namespace Dv { 00009 namespace Xml { 00010 /** Exception class for Dv::Xml classes and functions. */ 00011 class Exception: public std::runtime_error { 00012 public: 00013 /** Class name, i.e. "Dv::Xml::Exception". */ 00014 static const std::string NAME; 00015 /** Constructor. 00016 * @param msg message to append to NAME. 00017 */ 00018 Exception(const std::string& msg): std::runtime_error(NAME + ": " + msg) { 00019 } 00020 }; 00021 } 00022 } 00023 #endif
dvxml-0.1.7 | [ 7 January, 2008] |