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