aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2004-11-15 17:21:57 +0000
committerReid Spencer <rspencer@reidspencer.com>2004-11-15 17:21:57 +0000
commit6b09db550f7531582f39b6e903a950bbf693bc9c (patch)
tree2e8fe7b93bf94e9569692d7e05110f3c52331943
parentabc8650fc0fdd766819f72a3daea26c0e3c5591d (diff)
Provide the ThrowErrno utility.
Patch contributed by Morten Ofstad git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17827 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/System/Win32/Win32.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/System/Win32/Win32.h b/lib/System/Win32/Win32.h
index fb2c7e96fd..ab6b3c2b49 100644
--- a/lib/System/Win32/Win32.h
+++ b/lib/System/Win32/Win32.h
@@ -31,3 +31,6 @@ inline void ThrowError(const std::string& msg) {
throw s;
}
+inline void ThrowErrno(const std::string& prefix) {
+ ThrowError(prefix + ": " + strerror(errno));
+}