Loading isis/src/base/objs/IException/IException.h +11 −4 Original line number Diff line number Diff line Loading @@ -27,6 +27,8 @@ #include <exception> #include <string> #include "FileName.h" template <typename T> class QList; class QString; Loading @@ -35,7 +37,7 @@ class QString; * Macro for the filename and line number. This is typically used for the last * arguments to constructing an IException. */ #define _FILEINFO_ __FILE__,__LINE__ #define _FILEINFO_ Isis::FileName(__FILE__).name().toStdString().c_str(),__LINE__ namespace Isis { class Pvl; Loading Loading @@ -95,6 +97,12 @@ namespace Isis { * fixed -- fixes #755. * @history 2012-07-30 Jeff Anderson - Updated internal documentation * to improve backward compatibility * @history 2018-08-06 Kaitlyn Lee - With the new cmake system, we run unit tests from * build/untiTest, while in the old make system, we ran unit tests * directly from the object's directory. This change caused the c macro * __FILE__ to include the full path of unitTest.cpp when it expands. * Consequently, we have to strip the path from __FILE__ and put only * the name of the file into _FILEINFO_. */ class IException : public std::exception { public: Loading Loading @@ -250,4 +258,3 @@ namespace Isis { }; #endif isis/src/base/objs/IException/IException.truth +23 −23 Original line number Diff line number Diff line Loading @@ -34,7 +34,7 @@ Group = Error Class = "USER ERROR" Code = 2 Message = "Testing user error" File = ../src/base/objs/IException/unitTest.cpp File = unitTest.cpp Line = 63 End_Group Loading @@ -42,7 +42,7 @@ Group = Error Program = Unknown Code = 1 Message = "Testing unknown error" File = ../src/base/objs/IException/unitTest.cpp File = unitTest.cpp Line = 50 End_Group Loading @@ -50,7 +50,7 @@ Group = Error Program = Unknown Class = "USER ERROR" Code = 2 File = ../src/base/objs/IException/unitTest.cpp File = unitTest.cpp Line = 38 End_Group Loading Loading @@ -82,11 +82,11 @@ what(): Test Error 7 print(): **I/O ERROR** Testing I/O error in ../src/base/objs/IException/unitTest.cpp at 88. **PROGRAMMER ERROR** Testing programmer error in ../src/base/objs/IException/unitTest.cpp at 75. **USER ERROR** Testing user error in ../src/base/objs/IException/unitTest.cpp at 63. **ERROR** Testing unknown error in ../src/base/objs/IException/unitTest.cpp at 50. **USER ERROR** in ../src/base/objs/IException/unitTest.cpp at 38. **I/O ERROR** Testing I/O error in unitTest.cpp at 88. **PROGRAMMER ERROR** Testing programmer error in unitTest.cpp at 75. **USER ERROR** Testing user error in unitTest.cpp at 63. **ERROR** Testing unknown error in unitTest.cpp at 50. **USER ERROR** in unitTest.cpp at 38. **USER ERROR** what(): **I/O ERROR** Testing I/O error. Loading Loading @@ -125,11 +125,11 @@ Test Throwing Error: Rethrow and print Test Preference 'FileLine' Turned ON -- print(): **I/O ERROR** Testing I/O error in ../src/base/objs/IException/unitTest.cpp at 88. **PROGRAMMER ERROR** Testing programmer error in ../src/base/objs/IException/unitTest.cpp at 75. **USER ERROR** Testing user error in ../src/base/objs/IException/unitTest.cpp at 63. **ERROR** Testing unknown error in ../src/base/objs/IException/unitTest.cpp at 50. **USER ERROR** in ../src/base/objs/IException/unitTest.cpp at 38. **I/O ERROR** Testing I/O error in unitTest.cpp at 88. **PROGRAMMER ERROR** Testing programmer error in unitTest.cpp at 75. **USER ERROR** Testing user error in unitTest.cpp at 63. **ERROR** Testing unknown error in unitTest.cpp at 50. **USER ERROR** in unitTest.cpp at 38. **USER ERROR** Turned OFF -- print(): Loading Loading @@ -171,7 +171,7 @@ Group = Error Class = "I/O ERROR" Code = 4 Message = "Testing I/O error" File = ../src/base/objs/IException/unitTest.cpp File = unitTest.cpp Line = 88 End_Group Loading @@ -180,7 +180,7 @@ Group = Error Class = "PROGRAMMER ERROR" Code = 3 Message = "Testing programmer error" File = ../src/base/objs/IException/unitTest.cpp File = unitTest.cpp Line = 75 End_Group Loading @@ -189,7 +189,7 @@ Group = Error Class = "USER ERROR" Code = 2 Message = "Testing user error" File = ../src/base/objs/IException/unitTest.cpp File = unitTest.cpp Line = 63 End_Group Loading @@ -197,7 +197,7 @@ Group = Error Program = Unknown Code = 1 Message = "Testing unknown error" File = ../src/base/objs/IException/unitTest.cpp File = unitTest.cpp Line = 50 End_Group Loading @@ -205,7 +205,7 @@ Group = Error Program = Unknown Class = "USER ERROR" Code = 2 File = ../src/base/objs/IException/unitTest.cpp File = unitTest.cpp Line = 38 End_Group Loading @@ -222,7 +222,7 @@ Group = Error Class = "I/O ERROR" Code = 4 Message = "Testing I/O error" File = ../src/base/objs/IException/unitTest.cpp File = unitTest.cpp Line = 88 End_Group Loading @@ -231,7 +231,7 @@ Group = Error Class = "PROGRAMMER ERROR" Code = 3 Message = "Testing programmer error" File = ../src/base/objs/IException/unitTest.cpp File = unitTest.cpp Line = 75 End_Group Loading @@ -240,7 +240,7 @@ Group = Error Class = "USER ERROR" Code = 2 Message = "Testing user error" File = ../src/base/objs/IException/unitTest.cpp File = unitTest.cpp Line = 63 End_Group Loading @@ -248,7 +248,7 @@ Group = Error Program = Unknown Code = 1 Message = "Testing unknown error" File = ../src/base/objs/IException/unitTest.cpp File = unitTest.cpp Line = 50 End_Group Loading @@ -256,7 +256,7 @@ Group = Error Program = Unknown Class = "USER ERROR" Code = 2 File = ../src/base/objs/IException/unitTest.cpp File = unitTest.cpp Line = 38 End_Group Loading Loading
isis/src/base/objs/IException/IException.h +11 −4 Original line number Diff line number Diff line Loading @@ -27,6 +27,8 @@ #include <exception> #include <string> #include "FileName.h" template <typename T> class QList; class QString; Loading @@ -35,7 +37,7 @@ class QString; * Macro for the filename and line number. This is typically used for the last * arguments to constructing an IException. */ #define _FILEINFO_ __FILE__,__LINE__ #define _FILEINFO_ Isis::FileName(__FILE__).name().toStdString().c_str(),__LINE__ namespace Isis { class Pvl; Loading Loading @@ -95,6 +97,12 @@ namespace Isis { * fixed -- fixes #755. * @history 2012-07-30 Jeff Anderson - Updated internal documentation * to improve backward compatibility * @history 2018-08-06 Kaitlyn Lee - With the new cmake system, we run unit tests from * build/untiTest, while in the old make system, we ran unit tests * directly from the object's directory. This change caused the c macro * __FILE__ to include the full path of unitTest.cpp when it expands. * Consequently, we have to strip the path from __FILE__ and put only * the name of the file into _FILEINFO_. */ class IException : public std::exception { public: Loading Loading @@ -250,4 +258,3 @@ namespace Isis { }; #endif
isis/src/base/objs/IException/IException.truth +23 −23 Original line number Diff line number Diff line Loading @@ -34,7 +34,7 @@ Group = Error Class = "USER ERROR" Code = 2 Message = "Testing user error" File = ../src/base/objs/IException/unitTest.cpp File = unitTest.cpp Line = 63 End_Group Loading @@ -42,7 +42,7 @@ Group = Error Program = Unknown Code = 1 Message = "Testing unknown error" File = ../src/base/objs/IException/unitTest.cpp File = unitTest.cpp Line = 50 End_Group Loading @@ -50,7 +50,7 @@ Group = Error Program = Unknown Class = "USER ERROR" Code = 2 File = ../src/base/objs/IException/unitTest.cpp File = unitTest.cpp Line = 38 End_Group Loading Loading @@ -82,11 +82,11 @@ what(): Test Error 7 print(): **I/O ERROR** Testing I/O error in ../src/base/objs/IException/unitTest.cpp at 88. **PROGRAMMER ERROR** Testing programmer error in ../src/base/objs/IException/unitTest.cpp at 75. **USER ERROR** Testing user error in ../src/base/objs/IException/unitTest.cpp at 63. **ERROR** Testing unknown error in ../src/base/objs/IException/unitTest.cpp at 50. **USER ERROR** in ../src/base/objs/IException/unitTest.cpp at 38. **I/O ERROR** Testing I/O error in unitTest.cpp at 88. **PROGRAMMER ERROR** Testing programmer error in unitTest.cpp at 75. **USER ERROR** Testing user error in unitTest.cpp at 63. **ERROR** Testing unknown error in unitTest.cpp at 50. **USER ERROR** in unitTest.cpp at 38. **USER ERROR** what(): **I/O ERROR** Testing I/O error. Loading Loading @@ -125,11 +125,11 @@ Test Throwing Error: Rethrow and print Test Preference 'FileLine' Turned ON -- print(): **I/O ERROR** Testing I/O error in ../src/base/objs/IException/unitTest.cpp at 88. **PROGRAMMER ERROR** Testing programmer error in ../src/base/objs/IException/unitTest.cpp at 75. **USER ERROR** Testing user error in ../src/base/objs/IException/unitTest.cpp at 63. **ERROR** Testing unknown error in ../src/base/objs/IException/unitTest.cpp at 50. **USER ERROR** in ../src/base/objs/IException/unitTest.cpp at 38. **I/O ERROR** Testing I/O error in unitTest.cpp at 88. **PROGRAMMER ERROR** Testing programmer error in unitTest.cpp at 75. **USER ERROR** Testing user error in unitTest.cpp at 63. **ERROR** Testing unknown error in unitTest.cpp at 50. **USER ERROR** in unitTest.cpp at 38. **USER ERROR** Turned OFF -- print(): Loading Loading @@ -171,7 +171,7 @@ Group = Error Class = "I/O ERROR" Code = 4 Message = "Testing I/O error" File = ../src/base/objs/IException/unitTest.cpp File = unitTest.cpp Line = 88 End_Group Loading @@ -180,7 +180,7 @@ Group = Error Class = "PROGRAMMER ERROR" Code = 3 Message = "Testing programmer error" File = ../src/base/objs/IException/unitTest.cpp File = unitTest.cpp Line = 75 End_Group Loading @@ -189,7 +189,7 @@ Group = Error Class = "USER ERROR" Code = 2 Message = "Testing user error" File = ../src/base/objs/IException/unitTest.cpp File = unitTest.cpp Line = 63 End_Group Loading @@ -197,7 +197,7 @@ Group = Error Program = Unknown Code = 1 Message = "Testing unknown error" File = ../src/base/objs/IException/unitTest.cpp File = unitTest.cpp Line = 50 End_Group Loading @@ -205,7 +205,7 @@ Group = Error Program = Unknown Class = "USER ERROR" Code = 2 File = ../src/base/objs/IException/unitTest.cpp File = unitTest.cpp Line = 38 End_Group Loading @@ -222,7 +222,7 @@ Group = Error Class = "I/O ERROR" Code = 4 Message = "Testing I/O error" File = ../src/base/objs/IException/unitTest.cpp File = unitTest.cpp Line = 88 End_Group Loading @@ -231,7 +231,7 @@ Group = Error Class = "PROGRAMMER ERROR" Code = 3 Message = "Testing programmer error" File = ../src/base/objs/IException/unitTest.cpp File = unitTest.cpp Line = 75 End_Group Loading @@ -240,7 +240,7 @@ Group = Error Class = "USER ERROR" Code = 2 Message = "Testing user error" File = ../src/base/objs/IException/unitTest.cpp File = unitTest.cpp Line = 63 End_Group Loading @@ -248,7 +248,7 @@ Group = Error Program = Unknown Code = 1 Message = "Testing unknown error" File = ../src/base/objs/IException/unitTest.cpp File = unitTest.cpp Line = 50 End_Group Loading @@ -256,7 +256,7 @@ Group = Error Program = Unknown Class = "USER ERROR" Code = 2 File = ../src/base/objs/IException/unitTest.cpp File = unitTest.cpp Line = 38 End_Group Loading