nedexception.h

Go to the documentation of this file.
00001 //==========================================================================
00002 // nedexception.h  -
00003 //
00004 //                     OMNeT++/OMNEST
00005 //            Discrete System Simulation in C++
00006 //
00007 //==========================================================================
00008 
00009 /*--------------------------------------------------------------*
00010   Copyright (C) 2002-2008 Andras Varga
00011   Copyright (C) 2006-2008 OpenSim Ltd.
00012 
00013   This file is distributed WITHOUT ANY WARRANTY. See the file
00014   `license' for details on this and other legal matters.
00015 *--------------------------------------------------------------*/
00016 
00017 #ifndef __NEDEXCEPTION_H
00018 #define __NEDEXCEPTION_H
00019 
00020 #include <string>
00021 #include <exception>
00022 #include <stdexcept>
00023 #include "nedxmldefs.h"
00024 
00025 NAMESPACE_BEGIN
00026 
00027 class NEDElement;
00028 
00032 class NEDXML_API NEDException : public std::runtime_error
00033 {
00034   protected:
00035     std::string errormsg;
00036 
00037   public:
00041     NEDException(const char *messagefmt,...);
00042 
00046     NEDException(NEDElement *context, const char *messagefmt,...);
00047 
00051     virtual ~NEDException() throw() {}
00052 
00056     virtual const char *what() const throw() {return errormsg.c_str();}
00057 };
00058 
00059 
00060 NAMESPACE_END
00061 
00062 
00063 #endif
00064 
Generated on Tue Dec 2 11:16:31 2014 for OMNeT++ NEDXML by  doxygen 1.6.3