00001 /****************************************************************************** 00002 * __ _ _ _ _ _ _____ * 00003 * | \ / | | | | | | | | | | ___| * 00004 * | \/ | | | | | | | | | | |_ * 00005 * | | | | | | | | | | | _| * 00006 * | |\/| | | | | |__ | |__ | | | |__ * 00007 * |_| |_| |_| |____| |____| |_| |____| * 00008 * __________________________________________________________________________ * 00009 * Multifunctional Library For Image Processing * 00010 * * 00011 * * 00012 * * 00013 * (c) Copyright 2007 by Humbert Florent * 00014 * * 00015 * This program is free software; you can redistribute it and/or modify * 00016 * it under the terms of the GNU General Public License as published by * 00017 * the Free Software Foundation; only version 2 of the License. * 00018 * * 00019 * This program is distributed in the hope that it will be useful, * 00020 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00021 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00022 * GNU General Public License for more details. * 00023 * * 00024 * You should have received a copy of the GNU General Public License * 00025 * along with this program; if not, write to the Free Software * 00026 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA * 00027 * 02111-1307, USA. * 00028 ******************************************************************************/ 00029 00032 #include "MillieExceptions.hpp" 00033 00034 using namespace Millie; 00035 00036 00037 Exception::Exception(const std::string & m) 00038 { 00039 _msg = m; 00040 } 00041 00042 const char * Exception::what() const throw() 00043 { 00044 return _msg.c_str(); 00045 } 00046 00047 Exception::~Exception() throw() 00048 {} 00049 00050 LogicError::LogicError(const std::string & m) : 00051 Exception(m) 00052 { 00053 _msg = m; 00054 } 00055 00056 const char * LogicError::what() const throw() 00057 { 00058 return _msg.c_str(); 00059 } 00060 00061 LogicError::~LogicError() throw() 00062 {} 00063 00064 OutOfRange::OutOfRange(const std::string & m) : 00065 LogicError(m) 00066 { 00067 _msg = m; 00068 } 00069 00070 const char * OutOfRange::what() const throw() 00071 { 00072 return _msg.c_str(); 00073 } 00074 00075 OutOfRange::~OutOfRange() throw() 00076 {} 00077 00078 IllegalArgument::IllegalArgument(const std::string & m) : 00079 LogicError(m) 00080 { 00081 _msg = m; 00082 } 00083 00084 const char * IllegalArgument::what() const throw() 00085 { 00086 return _msg.c_str(); 00087 } 00088 00089 IllegalArgument::~IllegalArgument() throw() 00090 {} 00091 00092 NullPointer::NullPointer(const std::string & m) : 00093 LogicError(m) 00094 { 00095 _msg = m; 00096 } 00097 00098 const char * NullPointer::what() const throw() 00099 { 00100 return _msg.c_str(); 00101 } 00102 00103 NullPointer::~NullPointer() throw() 00104 {} 00105 00106 RuntimeException::RuntimeException(const std::string & m) 00107 : Exception(m) 00108 { 00109 _msg = m; 00110 } 00111 const char * RuntimeException::what() const throw() 00112 { 00113 return _msg.c_str(); 00114 } 00115 00116 RuntimeException::~RuntimeException() throw() 00117 {} 00118 00119 IOException::IOException(const std::string & m) 00120 : RuntimeException(m) 00121 { 00122 _msg = m; 00123 } 00124 00125 const char * IOException::what() const throw() 00126 { 00127 return _msg.c_str(); 00128 } 00129 00130 IOException::~IOException() throw() 00131 {} 00132 00133 ThreadCreationFailed::ThreadCreationFailed(const std::string & m) 00134 : RuntimeException(m) 00135 { 00136 _msg = m; 00137 } 00138 00139 const char * ThreadCreationFailed::what() const throw() 00140 { 00141 return _msg.c_str(); 00142 } 00143 00144 ThreadCreationFailed::~ThreadCreationFailed() throw() 00145 {} 00146 00147 00148 00149 00150 RuntimeThreadException::RuntimeThreadException(const std::string & m) 00151 : RuntimeException(m) 00152 { 00153 _msg = m; 00154 } 00155 00156 const char * RuntimeThreadException::what() const throw() 00157 { 00158 return _msg.c_str(); 00159 } 00160 00161 RuntimeThreadException::~RuntimeThreadException() throw() 00162 {} 00163 00164 00165 00166 MutexException::MutexException(const std::string & m) 00167 : RuntimeException(m) 00168 { 00169 _msg = m; 00170 } 00171 00172 const char * MutexException::what() const throw() 00173 { 00174 return _msg.c_str(); 00175 } 00176 00177 MutexException::~MutexException() throw() 00178 {} 00179 00180 00181 00182 00183 IllegalThreadStateException::IllegalThreadStateException(const std::string & m) 00184 : RuntimeThreadException(m) 00185 { 00186 _msg = m; 00187 } 00188 00189 const char * IllegalThreadStateException::what() const throw() 00190 { 00191 return _msg.c_str(); 00192 } 00193 00194 IllegalThreadStateException::~IllegalThreadStateException() throw() 00195 {} 00196 00197