exception.hh

Go to the documentation of this file.
00001 // Copyright (C) 2003, 2004, 2005 Laboratoire de Recherche en Informatique
00002 
00003 // This file is part of Qolyester.
00004 
00005 // Qolyester is free software; you can redistribute it and/or
00006 // modify it under the terms of the GNU General Public License
00007 // as published by the Free Software Foundation; either version 2
00008 // of the License, or (at your option) any later version.
00009 
00010 // Qolyester is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 // GNU General Public License for more details.
00014 
00015 // You should have received a copy of the GNU General Public License
00016 // along with this program; if not, write to the Free Software
00017 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00018 
00019 #ifndef QOLYESTER_UTL_EXCEPTION_HH
00020 # define QOLYESTER_UTL_EXCEPTION_HH 1
00021 
00022 # include <stdexcept>
00023 
00024 namespace olsr {
00025 
00026   namespace utl {
00027 
00028     class ErrnoException : public std::runtime_error {
00029       typedef ErrnoException            This;
00030       typedef std::runtime_error        Super;
00031     public:
00032       ErrnoException(const std::string& what, int e)
00033         : Super(what),
00034           errno_(e)
00035       {}
00036       
00037       int       get_errno() const { return errno_; }
00038     private:
00039       int       errno_;
00040     };
00041 
00042   } // namespace utl
00043 
00044   typedef utl::ErrnoException           errnoexcept_t;
00045 
00046 } // namespace olsr
00047 
00048 #endif // ! QOLYESTER_UTL_EXCEPTION_HH

Generated on Mon Sep 10 17:02:11 2007 for Qolyester daemon by  doxygen 1.5.1