aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/exit.hh
blob: 55f33e62f4cf64bc4a2bb0a3210eca05dda9d0ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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();
};

}