summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/sys/windows/LockFile.cpp
diff options
context:
space:
mode:
authorStephen D. Huston <shuston@apache.org>2009-08-05 17:17:30 +0000
committerStephen D. Huston <shuston@apache.org>2009-08-05 17:17:30 +0000
commit4b5a66d78efd8e9bed92a68ceb6eb49cbd7cc292 (patch)
tree6ab4e2df788ea97f0401ccbb58746d0cefceb518 /cpp/src/qpid/sys/windows/LockFile.cpp
parent6a88411f3a2f01c1992e86dc5cfada1d87a7f940 (diff)
downloadqpid-python-4b5a66d78efd8e9bed92a68ceb6eb49cbd7cc292.tar.gz
Try to create piddir if needed; on error throw a useful message. Fixes QPID-2030
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@801315 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/sys/windows/LockFile.cpp')
-rwxr-xr-xcpp/src/qpid/sys/windows/LockFile.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/cpp/src/qpid/sys/windows/LockFile.cpp b/cpp/src/qpid/sys/windows/LockFile.cpp
index 6cc710a3df..e9079b6094 100755
--- a/cpp/src/qpid/sys/windows/LockFile.cpp
+++ b/cpp/src/qpid/sys/windows/LockFile.cpp
@@ -43,7 +43,8 @@ LockFile::LockFile(const std::string& path_, bool create)
create ? OPEN_ALWAYS : OPEN_EXISTING,
FILE_FLAG_DELETE_ON_CLOSE, /* Delete file when closed */
NULL);
- QPID_WINDOWS_CHECK_NOT(h, INVALID_HANDLE_VALUE);
+ if (h == INVALID_HANDLE_VALUE)
+ throw qpid::Exception(path + qpid::sys::strError(GetLastError()));
impl.reset(new LockFilePrivate(h));
}