diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2016-09-01 19:44:38 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2016-09-01 19:44:38 -0400 |
commit | 96467f09f2ef9eba9c8e1d721349d9cc8f3e1bbb (patch) | |
tree | 97528c1d3129feaa152aa6c8d589b4ca9e8005f9 /indra/viewer_components/updater/llupdateinstaller.cpp | |
parent | 9be4e7e448769cb82dc7d82e93bee4f1cd2b3e6c (diff) | |
parent | 7203162071163108cbbb18f90ddb7f5d6734f8bd (diff) |
Automated merge with file:///Users/nat/linden/viewer-comment-lllog
Diffstat (limited to 'indra/viewer_components/updater/llupdateinstaller.cpp')
-rw-r--r-- | indra/viewer_components/updater/llupdateinstaller.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/indra/viewer_components/updater/llupdateinstaller.cpp b/indra/viewer_components/updater/llupdateinstaller.cpp index a0e2c0b362..1c7629da23 100644 --- a/indra/viewer_components/updater/llupdateinstaller.cpp +++ b/indra/viewer_components/updater/llupdateinstaller.cpp @@ -30,23 +30,25 @@ #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> - 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) LLTHROW(RelocateError()); return newPath; } |