about summary refs log tree commit diff
path: root/src/libutil/types.hh
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2010-12-13T16·53+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2010-12-13T16·53+0000
commitd787285af997a607bb678f39f340e663fafd3122 (patch)
tree42eecd29e47fdcf52f673ac0d5020d8d76ad8592 /src/libutil/types.hh
parent5833243c92f28759ff0fc1ff9266535a3230e2d6 (diff)
* nix-instantiate: return exit status 100 to denote a permanent build
  failure.  The build hook can use this to distinguish between
  transient and permanent failures on the remote side.

Diffstat (limited to 'src/libutil/types.hh')
-rw-r--r--src/libutil/types.hh5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libutil/types.hh b/src/libutil/types.hh
index 854a0f689a14..533fcca22eb0 100644
--- a/src/libutil/types.hh
+++ b/src/libutil/types.hh
@@ -29,7 +29,8 @@ protected:
     string prefix_; // used for location traces etc.
     string err;
 public:
-    BaseError(const format & f);
+    unsigned int status; // exit status
+    BaseError(const format & f, unsigned int status = 1);
     ~BaseError() throw () { };
     const char * what() const throw () { return err.c_str(); }
     const string & msg() const throw () { return err; }
@@ -41,7 +42,7 @@ public:
     class newClass : public superClass                  \
     {                                                   \
     public:                                             \
-        newClass(const format & f) : superClass(f) { }; \
+        newClass(const format & f, unsigned int status = 1) : superClass(f, status) { }; \
     };
 
 MakeError(Error, BaseError)