00001 /***************************************************************************\ 00002 * Copyright (C) by University Paris-Est - MISS team 00003 * GeometryException.cpp created in 3 2009. 00004 * Mail : biri@univ-mlv.fr 00005 * 00006 * This file is part of the OpenKraken-geometry. 00007 * 00008 * The OpenKraken-geometry is free software; you can redistribute it and/or modify 00009 * it under the terms of the GNU Lesser General Public License as published by 00010 * the Free Software Foundation; either version 3 of the License, or 00011 * (at your option) any later version. 00012 * 00013 * The OpenKraken-geometry is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 * GNU Lesser General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU Lesser General Public License 00019 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00020 * 00021 \***************************************************************************/ 00022 00023 /* 00024 * Internal Includes 00025 */ 00026 #include <GeometryException.hpp> 00027 00028 /* 00029 * Namespace 00030 */ 00031 namespace kn{ 00032 00033 /* 00034 * Functions definitions 00035 */ 00036 00037 GeometryException::GeometryException(const std::string& err, const std::string& funcname){ 00038 if(funcname=="" && err=="") 00039 str = "Error : No message"; 00040 if(funcname!="" && err!="") 00041 str = "(" + funcname + ") Error : " + err; 00042 if(funcname=="" && err!="") 00043 str = "Error : " + err; 00044 if(funcname!="" && err=="") 00045 str = "(" + funcname + ") Error : No message"; 00046 } 00047 00048 GeometryException::GeometryException(const GeometryException & e) : std::exception() { 00049 str = e.errorString(); 00050 } 00051 00052 /* 00053 * End of Namespace 00054 */ 00055 }