aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/exit.hh
blob: 27abc6a890d9965ca57a46e77462fcd520811a5f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#pragma once
///@file

#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();
};

}