diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2016-07-19 16:25:25 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2016-07-19 16:25:25 -0400 |
commit | 9c49a6c91dd9b5bbe811fcd91d8992ed6bac33e7 (patch) | |
tree | ac1d2b5683b0df287448373b79092981115d9410 /indra/llmessage/llhttpnode.cpp | |
parent | 47d93e4f65493977217cfed53ff68eb926cf9bb7 (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/llmessage/llhttpnode.cpp')
-rw-r--r-- | indra/llmessage/llhttpnode.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/indra/llmessage/llhttpnode.cpp b/indra/llmessage/llhttpnode.cpp index 08688ca48b..48ce258ba2 100644 --- a/indra/llmessage/llhttpnode.cpp +++ b/indra/llmessage/llhttpnode.cpp @@ -31,7 +31,8 @@ #include "llstl.h" #include "llhttpconstants.h" -#include <stdexcept> +#include "llexception.h" +#include <boost/throw_exception.hpp> const std::string CONTEXT_HEADERS("headers"); const std::string CONTEXT_PATH("path"); @@ -93,28 +94,28 @@ LLHTTPNode::~LLHTTPNode() namespace { - struct NotImplemented: public std::runtime_error + struct NotImplemented: public LLException { - NotImplemented(): std::runtime_error("LLHTTPNode::NotImplemented") {} + NotImplemented(): LLException("LLHTTPNode::NotImplemented") {} }; } // virtual LLSD LLHTTPNode::simpleGet() const { - throw NotImplemented(); + BOOST_THROW_EXCEPTION(NotImplemented()); } // virtual LLSD LLHTTPNode::simplePut(const LLSD& input) const { - throw NotImplemented(); + BOOST_THROW_EXCEPTION(NotImplemented()); } // virtual LLSD LLHTTPNode::simplePost(const LLSD& input) const { - throw NotImplemented(); + BOOST_THROW_EXCEPTION(NotImplemented()); } @@ -174,7 +175,7 @@ void LLHTTPNode::del(LLHTTPNode::ResponsePtr response, const LLSD& context) cons // virtual LLSD LLHTTPNode::simpleDel(const LLSD&) const { - throw NotImplemented(); + BOOST_THROW_EXCEPTION(NotImplemented()); } // virtual |