about summary refs log tree commit diff
path: root/src/libutil/util.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libutil/util.cc')
-rw-r--r--src/libutil/util.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libutil/util.cc b/src/libutil/util.cc
index ee34cb18a59e..0d970e69e303 100644
--- a/src/libutil/util.cc
+++ b/src/libutil/util.cc
@@ -25,6 +25,13 @@ Error::Error(const format & f)
 }
 
 
+Error & Error::addPrefix(const format & f)
+{
+    err = f.str() + err;
+    return *this;
+}
+
+
 SysError::SysError(const format & f)
     : Error(format("%1%: %2%") % f.str() % strerror(errno))
 {