cfl_exception.cppGo to the documentation of this file.00001 /** @file cfl_exception.cpp Class Exception */ 00002 00003 /* FAU Discrete Event Systems Library (libfaudes) 00004 00005 Copyright (C) 2006 Bernd Opitz 00006 Exclusive copyright is granted to Klaus Schmidt 00007 00008 This library is free software; you can redistribute it and/or 00009 modify it under the terms of the GNU Lesser General Public 00010 License as published by the Free Software Foundation; either 00011 version 2.1 of the License, or (at your option) any later version. 00012 00013 This library 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 GNU 00016 Lesser General Public License for more details. 00017 00018 You should have received a copy of the GNU Lesser General Public 00019 License along with this library; if not, write to the Free Software 00020 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 00021 00022 00023 #include "cfl_exception.h" 00024 00025 namespace faudes { 00026 00027 Exception::Exception(const std::string& rFunctionName, 00028 const std::string& rDescription, unsigned int errorId, bool mute) 00029 : exception(), mFunctionName(rFunctionName), 00030 mDescription(rDescription), mErrorId(errorId) { 00031 mMessage="libFAUDES Exception: " + rFunctionName + ": " +rDescription; 00032 #ifdef FAUDES_DEBUG_EXCEPTIONS 00033 if(!mute) { 00034 FAUDES_WRITE_CONSOLE("FAUDES_EXCEPTION: " + rFunctionName + ": " +rDescription); 00035 } 00036 #endif 00037 } 00038 00039 Exception::~Exception() throw() { } 00040 00041 const char* Exception::Where() const throw() { 00042 return mFunctionName.c_str(); 00043 } 00044 00045 const char* Exception::What() const throw() { 00046 return mDescription.c_str(); 00047 } 00048 00049 unsigned int Exception::Id() const throw() { 00050 return mErrorId; 00051 } 00052 00053 const char* Exception::Message() const throw() { 00054 return mMessage.c_str(); 00055 } 00056 00057 } // namespace faudes libFAUDES 2.23h --- 2014.04.03 --- c++ api documentaion by doxygen |