rssoft  0.0.0
Reed-Solomon codes library with soft decision decoding
/shared/development/google_code/rssoft/library/lib/GF_Exception.h
Go to the documentation of this file.
00001 /*
00002      Copyright 2013 Edouard Griffiths <f4exb at free dot fr>
00003 
00004      This file is part of RSSoft. A Reed-Solomon Soft Decoding library
00005 
00006      This program is free software; you can redistribute it and/or modify
00007      it under the terms of the GNU General Public License as published by
00008      the Free Software Foundation; either version 2 of the License, or
00009      (at your option) any later version.
00010 
00011      This program 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
00014      GNU General Public License for more details.
00015 
00016      You should have received a copy of the GNU General Public License
00017      along with this program; if not, write to the Free Software
00018      Foundation, Inc., 51 Franklin Street, Boston, MA  02110-1301  USA
00019 
00020          Original from Arash Partow (see original copytight notice).
00021          Modified and included in RSSoft in gf sub-namespace.
00022 
00023          Exception for Galois Field related procedures
00024 
00025 */
00026 #ifndef __GF_EXCEPTION_H__
00027 #define __GF_EXCEPTION_H__
00028 
00029 #include <string>
00030 
00031 namespace rssoft
00032 {
00033 namespace gf
00034 {
00035 
00039         class GF_Exception : public std::exception
00040         {
00041         public:
00046                 GF_Exception(std::string strError) : _error_msg(strError)
00047                 {}
00048                 virtual ~GF_Exception() throw()
00049                 {}
00054                 virtual const char* what() const throw()
00055                 {
00056                         return _error_msg.c_str();
00057                 }
00058 
00059         protected:
00060                 std::string _error_msg; 
00061 
00062         private:
00066                 GF_Exception()
00067                 {};
00068         };
00069 } // namespace gf
00070 } // namespace rssoft
00071 
00072 #endif // __GF_EXCEPTION_H__
 All Classes Namespaces Files Functions Variables Typedefs Friends Defines