1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-26 15:51:15 +02:00

* 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.
This commit is contained in:
Eelco Dolstra 2010-12-13 16:53:23 +00:00
parent 5833243c92
commit d787285af9
5 changed files with 29 additions and 14 deletions

View file

@ -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)