MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / format_error

Function format_error

3rdparty/ccc/src/ccc/util.cpp:10–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8static CustomErrorCallback custom_error_callback = nullptr;
9
10Error format_error(const char* source_file, int source_line, const char* format, ...)
11{
12 va_list args;
13 va_start(args, format);
14
15 char message[4096];
16 if(vsnprintf(message, sizeof(message), format, args) < 0) {
17 strncpy(message, "Failed to generate error message.", sizeof(message));
18 }
19
20 Error error;
21 error.message = message;
22 error.source_file = source_file;
23 error.source_line = source_line;
24
25 va_end(args);
26 return error;
27}
28
29void report_error(const Error& error)
30{

Callers 15

warn_implFunction · 0.85
report_errorFunction · 0.85
write_codecvtFunction · 0.85
write_encoded_tm_strFunction · 0.85
do_writeFunction · 0.85
throw_duration_errorFunction · 0.85
gmtimeFunction · 0.85
parse_chrono_formatFunction · 0.85
unsupportedMethod · 0.85
on_utc_offsetMethod · 0.85
on_tz_nameMethod · 0.85
to_nonnegative_intFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected