Debian Codegraph @

cross-project-tests/debuginfo-tests/dexter/dex/utils/ReturnCode.py

raw
1 # DExTer : Debugging Experience Tester
2 # ~~~~~~ ~ ~~ ~ ~~
3 #
4 # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5 # See https://llvm.org/LICENSE.txt for license information.
6 # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7
8 from enum import Enum
9
10
11 class ReturnCode(Enum):
12 """Used to indicate whole program success status."""
13
14 OK = 0
15 _ERROR = 1 # Unhandled exceptions result in exit(1) by default.
16 # Usage of _ERROR is discouraged:
17 # If the program cannot run, raise an exception.
18 # If the program runs successfully but the result is
19 # "failure" based on the inputs, return FAIL
20 FAIL = 2