Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add new entry in Release_Notes.
[simgrid.git] / src / mc / mc_exit.hpp
1 /* Copyright (c) 2015-2023. The SimGrid Team. All rights reserved.          */
2
3 /* This program is free software; you can redistribute it and/or modify it
4  * under the terms of the license (GNU LGPL) which comes with this package. */
5
6 #ifndef SIMGRID_MC_EXIT_HPP
7 #define SIMGRID_MC_EXIT_HPP
8 #include "xbt/base.h"
9 #include <exception>
10
11 namespace simgrid::mc {
12
13 enum class ExitStatus {
14   SUCCESS         = 0,
15   SAFETY          = 1,
16   LIVENESS        = 2,
17   DEADLOCK        = 3,
18   NON_TERMINATION = 4,
19   NON_DETERMINISM = 5,
20   PROGRAM_CRASH   = 6,
21   ERROR           = 63
22 };
23
24 struct McError : public std::exception {
25   const ExitStatus value;
26   explicit McError(ExitStatus v = ExitStatus::ERROR) : value(v) {}
27 };
28 } // namespace simgrid::mc
29
30 #endif