summaryrefslogtreecommitdiff
path: root/indra/llcommon/tests/wrapllerrs.h
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2016-07-19 16:25:25 -0400
committerNat Goodspeed <nat@lindenlab.com>2016-07-19 16:25:25 -0400
commit9c49a6c91dd9b5bbe811fcd91d8992ed6bac33e7 (patch)
treeac1d2b5683b0df287448373b79092981115d9410 /indra/llcommon/tests/wrapllerrs.h
parent47d93e4f65493977217cfed53ff68eb926cf9bb7 (diff)
MAINT-5011: Introduce LLException base class for viewer exceptions.
This also introduces LLContinueError for exceptions which should interrupt some part of viewer processing (e.g. the current coroutine) but should attempt to let the viewer session proceed. Derive all existing viewer exception classes from LLException rather than from std::runtime_error or std::logic_error. Use BOOST_THROW_EXCEPTION() rather than plain 'throw' to enrich the thrown exception with source file, line number and containing function.
Diffstat (limited to 'indra/llcommon/tests/wrapllerrs.h')
-rw-r--r--indra/llcommon/tests/wrapllerrs.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/indra/llcommon/tests/wrapllerrs.h b/indra/llcommon/tests/wrapllerrs.h
index 785197ba11..fa16fd6915 100644
--- a/indra/llcommon/tests/wrapllerrs.h
+++ b/indra/llcommon/tests/wrapllerrs.h
@@ -35,13 +35,14 @@
#include <tut/tut.hpp>
#include "llerrorcontrol.h"
+#include "llexception.h"
#include "stringize.h"
#include <boost/bind.hpp>
#include <boost/noncopyable.hpp>
#include <boost/shared_ptr.hpp>
+#include <boost/throw_exception.hpp>
#include <list>
#include <string>
-#include <stdexcept>
// statically reference the function in test.cpp... it's short, we could
// replicate, but better to reuse
@@ -67,9 +68,9 @@ struct WrapLLErrs
LLError::restoreSettings(mPriorErrorSettings);
}
- struct FatalException: public std::runtime_error
+ struct FatalException: public LLException
{
- FatalException(const std::string& what): std::runtime_error(what) {}
+ FatalException(const std::string& what): LLException(what) {}
};
void operator()(const std::string& message)
@@ -78,7 +79,7 @@ struct WrapLLErrs
error = message;
// Also throw an appropriate exception since calling code is likely to
// assume that control won't continue beyond LL_ERRS.
- throw FatalException(message);
+ BOOST_THROW_EXCEPTION(FatalException(message));
}
std::string error;