diff options
author | Rider Linden <rider@lindenlab.com> | 2016-07-21 09:08:28 -0700 |
---|---|---|
committer | Rider Linden <rider@lindenlab.com> | 2016-07-21 09:08:28 -0700 |
commit | 31009296bb8658155b1622395f9a0e9eb2ab3a51 (patch) | |
tree | 4bcacc043c143079a0e70cb0aa22ad2c444674d1 /indra/viewer_components/updater/llupdateinstaller.cpp | |
parent | d0d07ccac565632497c50510714b30503be8aa94 (diff) | |
parent | 9c49a6c91dd9b5bbe811fcd91d8992ed6bac33e7 (diff) |
Merge
Diffstat (limited to 'indra/viewer_components/updater/llupdateinstaller.cpp')
-rw-r--r-- | indra/viewer_components/updater/llupdateinstaller.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/indra/viewer_components/updater/llupdateinstaller.cpp b/indra/viewer_components/updater/llupdateinstaller.cpp index a0e2c0b362..9f9a08f590 100644 --- a/indra/viewer_components/updater/llupdateinstaller.cpp +++ b/indra/viewer_components/updater/llupdateinstaller.cpp @@ -30,23 +30,26 @@ #include "llupdateinstaller.h" #include "lldir.h" #include "llsd.h" +#include "llexception.h" #if defined(LL_WINDOWS) #pragma warning(disable: 4702) // disable 'unreachable code' so we can use lexical_cast (really!). #endif #include <boost/lexical_cast.hpp> - +#include <boost/throw_exception.hpp> namespace { - class RelocateError {}; - - + struct RelocateError: public LLException + { + RelocateError(): LLException("llupdateinstaller: RelocateError") {} + }; + std::string copy_to_temp(std::string const & path) { std::string scriptFile = gDirUtilp->getBaseFileName(path); std::string newPath = gDirUtilp->getExpandedFilename(LL_PATH_TEMP, scriptFile); apr_status_t status = apr_file_copy(path.c_str(), newPath.c_str(), APR_FILE_SOURCE_PERMS, gAPRPoolp); - if(status != APR_SUCCESS) throw RelocateError(); + if(status != APR_SUCCESS) BOOST_THROW_EXCEPTION(RelocateError()); return newPath; } |