diff options
Diffstat (limited to 'src/util.cc')
-rw-r--r-- | src/util.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/util.cc b/src/util.cc index c6a0c1199770..a042a65b075c 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; } |