diff --git a/rostests/rosautotest/CFatalException.cpp b/rostests/rosautotest/CFatalException.cpp index 1541b5a68e4..1c2a1699b9d 100644 --- a/rostests/rosautotest/CFatalException.cpp +++ b/rostests/rosautotest/CFatalException.cpp @@ -15,12 +15,12 @@ * Constant pointer to a char array with the source file where the exception occured (__FILE__) * * @param Line - * Constant pointer to a char array with the appropriate source line (#__LINE__) + * Integer value with the appropriate source line (__LINE__) * * @param Message * Constant pointer to a char array containing a short message about the exception */ -CFatalException::CFatalException(const char* File, const char* Line, const char* Message) +CFatalException::CFatalException(const char* File, int Line, const char* Message) : m_File(File), m_Line(Line), m_Message(Message) { } diff --git a/rostests/rosautotest/CFatalException.h b/rostests/rosautotest/CFatalException.h index 78d1b00b22e..a49f0c246c8 100644 --- a/rostests/rosautotest/CFatalException.h +++ b/rostests/rosautotest/CFatalException.h @@ -9,13 +9,13 @@ class CFatalException { private: string m_File; - string m_Line; + int m_Line; string m_Message; public: - CFatalException(const char* File, const char* Line, const char* Message); + CFatalException(const char* File, int Line, const char* Message); const string& GetFile() const { return m_File; } - const string& GetLine() const { return m_Line; } + int GetLine() const { return m_Line; } const string& GetMessage() const { return m_Message; } }; diff --git a/rostests/rosautotest/precomp.h b/rostests/rosautotest/precomp.h index 57acaf835df..f5e65ad0798 100644 --- a/rostests/rosautotest/precomp.h +++ b/rostests/rosautotest/precomp.h @@ -33,9 +33,8 @@ using namespace std; #include "CWineTest.h" /* Useful macros */ -#define STRINGIZER(Value) #Value #define EXCEPTION(Message) throw CSimpleException(Message) -#define FATAL(Message) throw CFatalException(__FILE__, STRINGIZER(__LINE__), Message) +#define FATAL(Message) throw CFatalException(__FILE__, __LINE__, Message) #define SSEXCEPTION throw CSimpleException(ss.str().c_str()) /* main.c */