about summary refs log tree commit diff
path: root/src/libutil/types.hh
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2009-06-30T13·28+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2009-06-30T13·28+0000
commitf2c3fc519190b021f0bb3b66f58d0fe7fc40b0e7 (patch)
tree3f63dc0097d73ec82250a77574703e744eb03c81 /src/libutil/types.hh
parenta2fc3a53ba87d3688dae0554bfdb2fe3fb3dbf2a (diff)
* Don't show trace information by default (`--show-trace' to enable).
  NixOS evaluation errors in particular look intimidating and
  generally aren't very useful.  Ideally the builtins.throw messages
  should be self-contained.

Diffstat (limited to 'src/libutil/types.hh')
-rw-r--r--src/libutil/types.hh2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libutil/types.hh b/src/libutil/types.hh
index fd50de00cce5..f110188da151 100644
--- a/src/libutil/types.hh
+++ b/src/libutil/types.hh
@@ -24,12 +24,14 @@ using boost::format;
 class BaseError : public std::exception 
 {
 protected:
+    string prefix_; // used for location traces etc.
     string err;
 public:
     BaseError(const format & f);
     ~BaseError() throw () { };
     const char * what() const throw () { return err.c_str(); }
     const string & msg() const throw () { return err; }
+    const string & prefix() const throw () { return prefix_; }
     BaseError & addPrefix(const format & f);
 };