diff options
author | Logan Dethrow <log@lindenlab.com> | 2011-09-15 14:16:53 -0400 |
---|---|---|
committer | Logan Dethrow <log@lindenlab.com> | 2011-09-15 14:16:53 -0400 |
commit | 04d18d0d0d528e7b65d286c91dbce27f119a9117 (patch) | |
tree | 4be05a79289d7f3284372a3e92eb23bf58205a14 | |
parent | 85c8c97f7aeb8f0df1c683375aa8108eeaf70201 (diff) |
Added extra exception catching code to llevents_tut.cpp to fix linux test failures.
-rw-r--r-- | indra/test/llevents_tut.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/indra/test/llevents_tut.cpp b/indra/test/llevents_tut.cpp index 57e22bbb56..704c0de1e6 100644 --- a/indra/test/llevents_tut.cpp +++ b/indra/test/llevents_tut.cpp @@ -468,6 +468,33 @@ namespace tut { threw = true; } +#ifdef LL_LINUX + catch (const std::runtime_error& ex) + { + // This clause is because on Linux, on the viewer side, LLListenerOrPumpName::Empty + // exception isn't caught by the clause above. Warn the user... + std::cerr << "Failed to catch " << typeid(ex).name() << std::endl; + // But if the expected exception was thrown, allow the test to + // succeed anyway. Not sure how else to handle this odd case. + // This approach is also used in llsdmessage_test.cpp. + if (std::string(typeid(ex).name()) == typeid(LLListenerOrPumpName::Empty).name()) + { + threw = true; + } + else + { + // We don't even recognize this exception. Let it propagate + // out to TUT to fail the test. + throw; + } + } + catch (...) + { + std::cerr << "Utterly failed to catch expected exception!" << std::endl; + // Another exception besides LLListenerOrPumpName::Empty was thrown, fail the test. + throw; + } +#endif // LL_LINUX ensure("threw Empty", threw); } |