Atlas-C++
Exception.h
00001 // This file may be redistributed and modified only under the terms of
00002 // the GNU Lesser General Public License (See COPYING for details).
00003 // Copyright (C) 2001 Al Riddoch
00004 
00005 // $Id$
00006 
00007 #ifndef ATLAS_EXCEPTION_H
00008 #define ATLAS_EXCEPTION_H
00009 
00010 #include <string>
00011 #include <exception>
00012 
00013 namespace Atlas {
00014 
00017 class Exception : public std::exception
00018 {
00019   protected:
00020     std::string m_description;
00021     
00022   public:
00023     Exception(const std::string & d = "UNKNOWN ERROR") : m_description(d) { }
00024     virtual ~Exception() throw ();
00025     const std::string & getDescription() const {
00026         return m_description;
00027     }
00028     virtual const char * what() const throw();
00029 };
00030 
00031 } // namespace Atlas
00032 
00033 #endif // ATLAS_EXCEPTION_H

Copyright 2000-2004 the respective authors.

This document can be licensed under the terms of the GNU Free Documentation License or the GNU General Public License and may be freely distributed under the terms given by one of these licenses.