NERsuite  1.1.1
src/nersuitetest/TestUtil.h
00001 #ifndef _TEST_UTIL_H
00002 #define _TEST_UTIL_H
00003 
00004 #include <exception>
00005 #include <string>
00006 #include <sstream>
00007 
00008 using namespace std;
00009 
00010 class TestException : public exception
00011 {
00012 private:
00013         string m_What;
00014 
00015 public:
00016         TestException(const char* msg, const char* file, int line)
00017         {
00018                 ostringstream str;
00019                 str << file << "(" << line << ") : " << msg;
00020                 m_What = str.str();
00021         }
00022 
00023         virtual const char* what() const
00024         {
00025                 return m_What.c_str();
00026         }
00027 };
00028 
00029 #endif
 All Classes Functions Variables