error.cpp

src/types/error.cpp

@file error.cpp @brief Error type implementations for librentropic-types.

Owners: @tvanfossen

entropic_error_name

const char * entropic_error_name(entropic_error_t code)

Get the human-readable name for an error code.

src/types/error.cpp:87

Show on the map →

Called by SCENARIO, SCENARIO, SCENARIO, TEST_CASE, spec_error

Calls none

Source · 4 lines
extern "C" const char* entropic_error_name(entropic_error_t code) {
    int idx = static_cast<int>(code);
    return (idx >= 0 && idx < s_error_count) ? s_error_names[idx] : "ENTROPIC_ERROR_UNKNOWN";
}
Activity · 2 steps
lines 88–88int idx = static_cast<int>(code);lines 89–89return (idx >= 0 && idx < s_error_count) ? s_error_names[idx] : "ENTROPIC_ERROR_UNKNOWN";
ENTROPIC_EXPORT const char * entropic_error_name(entropic_error_t code)

Get the human-readable name for an error code.

src/types/error.cpp:87

Show on the map →

Called by SCENARIO, SCENARIO, SCENARIO, TEST_CASE, spec_error

Calls none

Source · 4 lines
extern "C" const char* entropic_error_name(entropic_error_t code) {
    int idx = static_cast<int>(code);
    return (idx >= 0 && idx < s_error_count) ? s_error_names[idx] : "ENTROPIC_ERROR_UNKNOWN";
}
Activity · 2 steps
lines 88–88int idx = static_cast<int>(code);lines 89–89return (idx >= 0 && idx < s_error_count) ? s_error_names[idx] : "ENTROPIC_ERROR_UNKNOWN";

Requirements

REQ-TYPE-003