diff options
| author | Nat Goodspeed <nat@lindenlab.com> | 2016-09-01 15:22:34 -0400 |
|---|---|---|
| committer | Nat Goodspeed <nat@lindenlab.com> | 2016-09-01 15:22:34 -0400 |
| commit | 7203162071163108cbbb18f90ddb7f5d6734f8bd (patch) | |
| tree | 698966629d29e71f77777c75331aeac272e0371a /indra/viewer_components/updater/llupdateinstaller.cpp | |
| parent | 31d3d654f156351e3cf29f97fd97cbda046ae650 (diff) | |
| parent | 1bbc523b048628630e0a45f67f15cdf39cb138d9 (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; } |
