1 // SPDX-FileCopyrightText: Copyright 2012 Intel Corporation
2 // SPDX-License-Identifier: BSD-2-Clause
8 #include "wcore_error.h"
10 WAFFLE_API
enum waffle_error
11 waffle_error_get_code(void)
13 return wcore_error_get_code();
16 WAFFLE_API
const struct waffle_error_info
*
17 waffle_error_get_info(void)
19 return wcore_error_get_info();
22 WAFFLE_API
const char*
23 waffle_error_to_string(enum waffle_error e
)
26 #define CASE(x) case x: return #x
27 CASE(WAFFLE_NO_ERROR
);
28 CASE(WAFFLE_ERROR_FATAL
);
29 CASE(WAFFLE_ERROR_UNKNOWN
);
30 CASE(WAFFLE_ERROR_INTERNAL
);
31 CASE(WAFFLE_ERROR_BAD_ALLOC
);
32 CASE(WAFFLE_ERROR_NOT_INITIALIZED
);
33 CASE(WAFFLE_ERROR_ALREADY_INITIALIZED
);
34 CASE(WAFFLE_ERROR_BAD_ATTRIBUTE
);
35 CASE(WAFFLE_ERROR_BAD_PARAMETER
);
36 CASE(WAFFLE_ERROR_BAD_DISPLAY_MATCH
);
37 CASE(WAFFLE_ERROR_UNSUPPORTED_ON_PLATFORM
);
38 CASE(WAFFLE_ERROR_BUILT_WITHOUT_SUPPORT
);