1 /*===-- clang-c/CXErrorCode.h - C Index Error Codes  --------------*- C -*-===*\
2 |*                                                                            *|
3 |*                     The LLVM Compiler Infrastructure                       *|
4 |*                                                                            *|
5 |* This file is distributed under the University of Illinois Open Source      *|
6 |* License. See LICENSE.TXT for details.                                      *|
7 |*                                                                            *|
8 |*===----------------------------------------------------------------------===*|
9 |*                                                                            *|
10 |* This header provides the CXErrorCode enumerators.                          *|
11 |*                                                                            *|
12 \*===----------------------------------------------------------------------===*/
13 
14 module clang.c.CXErrorCode;
15 
16 extern (C):
17 
18 /**
19  * \brief Error codes returned by libclang routines.
20  *
21  * Zero (\c CXError_Success) is the only error code indicating success.  Other
22  * error codes, including not yet assigned non-zero values, indicate errors.
23  */
24 enum CXErrorCode
25 {
26     /**
27      * \brief No error.
28      */
29     success = 0,
30 
31     /**
32      * \brief A generic error code, no further details are available.
33      *
34      * Errors of this kind can get their own specific error codes in future
35      * libclang versions.
36      */
37     failure = 1,
38 
39     /**
40      * \brief libclang crashed while performing the requested operation.
41      */
42     crashed = 2,
43 
44     /**
45      * \brief The function detected that the arguments violate the function
46      * contract.
47      */
48     invalidArguments = 3,
49 
50     /**
51      * \brief An AST deserialization error has occurred.
52      */
53     astReadError = 4
54 }