diff --git a/src/base/gtest/logging.hh b/src/base/gtest/logging.hh index 12d4e5afb4..1d5a39c6bb 100644 --- a/src/base/gtest/logging.hh +++ b/src/base/gtest/logging.hh @@ -32,6 +32,14 @@ namespace gem5 { +// This custom exception type will help prevent fatal exceptions from being +// caught by other code in gem5 and let them escape to the gtest framework. +// Unfortunately that results in a somewhat confusing message about an unknown +// exception being thrown after the panic/fatal message has been printed, but +// there will at least be some indication what went wrong. +struct GTestException +{}; + class GTestLogOutput : public std::ostringstream { private: diff --git a/src/base/gtest/logging_mock.cc b/src/base/gtest/logging_mock.cc index 101374eecc..07a20ea1ec 100644 --- a/src/base/gtest/logging_mock.cc +++ b/src/base/gtest/logging_mock.cc @@ -36,14 +36,6 @@ namespace gem5 namespace { -// This custom exception type will help prevent fatal exceptions from being -// caught by other code in gem5 and let them escape to the gtest framework. -// Unfortunately that results in a somewhat confusing message about an unknown -// exception being thrown after the panic/fatal message has been printed, but -// there will at least be some indication what went wrong. -struct GTestException -{}; - class GTestLogger : public Logger { public: