coreclr_hosting_shared/
status_code.rs

1/// Status codes returned by the hosting APIs from `hostfxr`, `hostpolicy` and `nethost`.
2///
3/// Source: <https://github.com/dotnet/runtime/blob/main/docs/design/features/host-error-codes.md>
4/// Definition: <https://github.com/dotnet/runtime/blob/57bfe474518ab5b7cfe6bf7424a79ce3af9d6657/src/native/corehost/error_codes.h>
5#[repr(u32)]
6#[non_exhaustive]
7#[rustfmt::skip]
8#[allow(clippy::unreadable_literal)]
9pub enum StatusCode {
10    // Success
11    Success                             = 0,
12    Success_HostAlreadyInitialized      = 0x00000001,
13    Success_DifferentRuntimeProperties  = 0x00000002,
14
15    // Failure
16    InvalidArgFailure                   = 0x80008081,
17    CoreHostLibLoadFailure              = 0x80008082,
18    CoreHostLibMissingFailure           = 0x80008083,
19    CoreHostEntryPointFailure           = 0x80008084,
20    CoreHostCurHostFindFailure          = 0x80008085,
21    // unused                           = 0x80008086,
22    CoreClrResolveFailure               = 0x80008087,
23    CoreClrBindFailure                  = 0x80008088,
24    CoreClrInitFailure                  = 0x80008089,
25    CoreClrExeFailure                   = 0x8000808a,
26    ResolverInitFailure                 = 0x8000808b,
27    ResolverResolveFailure              = 0x8000808c,
28    LibHostCurExeFindFailure            = 0x8000808d,
29    LibHostInitFailure                  = 0x8000808e,
30    // unused                           = 0x8000808f,
31    LibHostExecModeFailure              = 0x80008090,
32    LibHostSdkFindFailure               = 0x80008091,
33    LibHostInvalidArgs                  = 0x80008092,
34    InvalidConfigFile                   = 0x80008093,
35    AppArgNotRunnable                   = 0x80008094,
36    AppHostExeNotBoundFailure           = 0x80008095,
37    FrameworkMissingFailure             = 0x80008096,
38    HostApiFailed                       = 0x80008097,
39    HostApiBufferTooSmall               = 0x80008098,
40    LibHostUnknownCommand               = 0x80008099,
41    LibHostAppRootFindFailure           = 0x8000809a,
42    SdkResolverResolveFailure           = 0x8000809b,
43    FrameworkCompatFailure              = 0x8000809c,
44    FrameworkCompatRetry                = 0x8000809d,
45    AppHostExeNotBundle                 = 0x8000809e, // unused (not defined in error_codes.h but described in host-error-codes.md)
46    BundleExtractionFailure             = 0x8000809f,
47    BundleExtractionIOError             = 0x800080a0,
48    LibHostDuplicateProperty            = 0x800080a1,
49    HostApiUnsupportedVersion           = 0x800080a2,
50    HostInvalidState                    = 0x800080a3,
51    HostPropertyNotFound                = 0x800080a4,
52    CoreHostIncompatibleConfig          = 0x800080a5,
53    HostApiUnsupportedScenario          = 0x800080a6,
54    HostFeatureDisabled                 = 0x800080a7,
55}