mirror of
https://github.com/Zelda64Recomp/Zelda64Recomp.git
synced 2025-10-30 08:03:03 +00:00
Switch to runtime concatenation of function name in data API error reporting to fix Linux compilation issue
This commit is contained in:
parent
d15d448d80
commit
1a6471a3a8
1 changed files with 7 additions and 2 deletions
|
|
@ -172,13 +172,18 @@ LockedSlotmap<MemorySlotmap> memory_slotmaps{};
|
||||||
|
|
||||||
#define REGISTER_FUNC(name) recomp::overlays::register_base_export(#name, name)
|
#define REGISTER_FUNC(name) recomp::overlays::register_base_export(#name, name)
|
||||||
|
|
||||||
|
static void show_fatal_error_message_box(const char* funcname, const char* errstr) {
|
||||||
|
std::string message = std::string{"Fatal error in mod - "} + funcname + " : " + errstr;
|
||||||
|
recompui::message_box(message.c_str());
|
||||||
|
}
|
||||||
|
|
||||||
#define HANDLE_INVALID_ERROR() \
|
#define HANDLE_INVALID_ERROR() \
|
||||||
recompui::message_box("Fatal error in mod - " __FUNCTION__ " : handle is invalid"); \
|
show_fatal_error_message_box(__FUNCTION__, "handle is invalid"); \
|
||||||
assert(false); \
|
assert(false); \
|
||||||
ultramodern::error_handling::quick_exit(__FILE__, __LINE__, __FUNCTION__);
|
ultramodern::error_handling::quick_exit(__FILE__, __LINE__, __FUNCTION__);
|
||||||
|
|
||||||
#define SLOTMAP_KEY_INVALID_ERROR() \
|
#define SLOTMAP_KEY_INVALID_ERROR() \
|
||||||
recompui::message_box("Fatal error in mod - " __FUNCTION__ " : slotmap key is invalid"); \
|
show_fatal_error_message_box(__FUNCTION__, "slotmap key is invalid"); \
|
||||||
assert(false); \
|
assert(false); \
|
||||||
ultramodern::error_handling::quick_exit(__FILE__, __LINE__, __FUNCTION__);
|
ultramodern::error_handling::quick_exit(__FILE__, __LINE__, __FUNCTION__);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue