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

exception.h

Go to the documentation of this file.
00001 #ifndef DVTICKET_EXCEPTION_H
00002 #define DVTICKET_EXCEPTION_H
00003 // $Id: exception.h,v 1.1 2003/08/06 12:12:06 dvermeir Exp $
00004 
00005 #include <string>
00006 #include <stdexcept>
00007 
00008 namespace Dv {
00009 namespace Ticket {
00010 
00011 /** Ticket exception class. */
00012 class Exception: public std::runtime_error {
00013 public:
00014   /** Class name, i.e. "Dv::Ticket::Server::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 #endif

dvticket-0.7.1 [24 October, 2003]