mirror of
https://github.com/NixOS/nix
synced 2025-06-30 19:57:59 +02:00
:quit
in the debugger should quit the whole program
This commit is contained in:
parent
78e7c98b02
commit
2a8fe9a938
10 changed files with 111 additions and 44 deletions
19
src/libutil/exit.hh
Normal file
19
src/libutil/exit.hh
Normal file
|
@ -0,0 +1,19 @@
|
|||
#pragma once
|
||||
|
||||
#include <exception>
|
||||
|
||||
namespace nix {
|
||||
|
||||
/**
|
||||
* Exit the program with a given exit code.
|
||||
*/
|
||||
class Exit : public std::exception
|
||||
{
|
||||
public:
|
||||
int status;
|
||||
Exit() : status(0) { }
|
||||
explicit Exit(int status) : status(status) { }
|
||||
virtual ~Exit();
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue