Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members

exception.h

Go to the documentation of this file.
00001 #ifndef DVXMLSRV_EXCEPTION_H
00002 #define DVXMLSRV_EXCEPTION_H
00003 // $Id: exception.h,v 1.1 2003/08/08 11:24:35 dvermeir Exp $
00004 
00005 #include <string>
00006 #include <stdexcept>
00007 
00008 namespace Dv { 
00009 namespace Xml {
00010 
00011 /** Exception class for Dv::Xml classes and functions. */
00012 class Exception: public std::runtime_error {
00013 public:
00014   /** Class name, i.e. "Dv::Xml::Exception".  */
00015   static const std::string NAME;
00016   /** Constructor.
00017    * @param msg message to append to NAME.
00018    */
00019   Exception(const std::string& msg): std::runtime_error(NAME + ": " + msg) {}
00020 };
00021 
00022 }}
00023 #endif

dvxml-0.1.4 [19 September, 2003]