aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/util.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2006-03-08 14:11:19 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2006-03-08 14:11:19 +0000
commit9088dee9e265db8176b61e53ac43a916fdd34a3d (patch)
tree42abd16be1b9bc4e4b5b4defdcd44b5bd9972740 /src/libutil/util.cc
parentfa72ae1e9cad0dded28b965fe97293bbeeac031e (diff)
* Some refactoring of the exception handling code so that we can catch
Nix expression assertion failures.
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 ee34cb18a..0d970e69e 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))
{