error.h

Go to the documentation of this file.
00001 /* vim: set et sw=3 tw=0 fo=croqlaw cino=t0:
00002  *
00003  * Astxx, the Asterisk C++ API and Utility Library.
00004  * Copyright (C) 2005-2007  Matthew A. Nicholson
00005  * Copyright (C) 2005-2007  Digium, Inc.
00006  * 
00007  * This library is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU Lesser General Public
00009  * License version 2.1 as published by the Free Software Foundation.
00010  * 
00011  * This library is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Lesser General Public License for more details.
00015  * 
00016  * You should have received a copy of the GNU Lesser General Public
00017  * License along with this library; if not, write to the Free Software
00018  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019  */
00020 
00026 #ifndef ASTXX_MANAGER_ACTION_ERROR_H
00027 #define ASTXX_MANAGER_ACTION_ERROR_H
00028 
00029 #include <astxx/manager/message.h>
00030 #include <astxx/manager/error.h>
00031 
00032 namespace astxx {
00033    namespace manager {
00034       namespace action {
00035 
00037          class error : public manager::error {
00038             public:
00039                explicit error(std::string error, message::action action) : manager::error(error), m_action(action) { }
00040 
00041                virtual ~error() throw() { }
00045                virtual message::action action() const {
00046                   return m_action;
00047                }
00048             public:
00049                message::action m_action;
00050          };
00051 
00053          class missing_data : public action::error {
00054             public:
00055                missing_data(std::string error, message::action action) : action::error(error, action) { }
00056          };
00057 
00059          class bad_data : public action::error {
00060             public:
00061                bad_data(std::string error, message::action action) : action::error(error, action) { }
00062          };
00063 
00065          class channel_not_found : public action::error {
00066             public:
00067                channel_not_found(std::string error, message::action action) : action::error(error, action) { }
00068          };
00069 
00070       }
00071    }
00072 }
00073 
00074 #endif

Generated on Thu Jul 3 01:32:42 2008 for Astxx by  doxygen 1.5.6