-
Notifications
You must be signed in to change notification settings - Fork 4
Error Handling
mini edited this page Sep 12, 2026
·
6 revisions
Every function returns an error code, indicating a specific or unspecific error. Extended information can optionally be retrieved in a string format.
Every CLR-exception is catched at the FFI-boundary and turned into an "error" in the context of osu-natives' error handling. The error code will be Failure (127), and the error message will contain the exceptions' message and stack trace.
Functions may also return specific error codes, optionally including additional information in an error message.
A pointer to the error message can be retrieved using this function:
const uint8_t* ErrorHandler_GetLastMessage(void);The returned pointer is thread-specific, and thus only returns the last message issued in the current theread.
The error codes and their meaning can be found here.