aboutsummaryrefslogtreecommitdiff
path: root/src/util.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.cc')
-rw-r--r--src/util.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/util.cc b/src/util.cc
index c6a0c1199..a042a65b0 100644
--- a/src/util.cc
+++ b/src/util.cc
@@ -11,10 +11,15 @@
string thisSystem = SYSTEM;
-SysError::SysError(string msg)
+Error::Error(const format & f)
+{
+ err = f.str();
+}
+
+
+SysError::SysError(const format & f)
+ : Error(format("%1%: %2%") % f.str() % strerror(errno))
{
- char * sysMsg = strerror(errno);
- err = msg + ": " + sysMsg;
}