aboutsummaryrefslogtreecommitdiffstats
path: root/lib/System/Win32/Path.inc
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-08-23 07:30:48 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-08-23 07:30:48 +0000
commit5a060775da43ec2ef37e839e93a0805d543708a9 (patch)
tree6cd7efaa67dec5d363323ccc5b9ee95c2e5bb8bd /lib/System/Win32/Path.inc
parent6f4c60770cfe6c485cdcb1397df59d2c7778cbc9 (diff)
downloadexternal_llvm-5a060775da43ec2ef37e839e93a0805d543708a9.zip
external_llvm-5a060775da43ec2ef37e839e93a0805d543708a9.tar.gz
external_llvm-5a060775da43ec2ef37e839e93a0805d543708a9.tar.bz2
For PR797:
Eliminate exception throwing from Path::renamePathOnDisk and adjust its users correspondingly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29843 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/System/Win32/Path.inc')
-rw-r--r--lib/System/Win32/Path.inc6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/System/Win32/Path.inc b/lib/System/Win32/Path.inc
index 913a409..ece5727 100644
--- a/lib/System/Win32/Path.inc
+++ b/lib/System/Win32/Path.inc
@@ -651,10 +651,10 @@ bool Path::getMagicNumber(std::string& Magic, unsigned len) const {
}
bool
-Path::renamePathOnDisk(const Path& newName) {
+Path::renamePathOnDisk(const Path& newName, std::string* ErrMsg) {
if (!MoveFileEx(path.c_str(), newName.c_str(), MOVEFILE_REPLACE_EXISTING))
- ThrowError("Can't move '" + path +
- "' to '" + newName.path + "': ");
+ return MakeErrMsg(ErrMsg, "Can't move '" + path + "' to '" + newName.path
+ + "': ");
return true;
}