Back to main page

Message

This interface is created because the engine can't pause the calling thread to show an error message without loosing thread safety or becomming unresponsive.

When you get an error message from the engine, it is stored in the message queue. Only internal errors are not using this system but they are only shown if the engine has detected an internal access violation.

Up to 32 messages can be stored at once to prevent flooding of messages.

You need to create a routine like the one called "RE" in the code examples that you call after each call to the engine that may send an error message. The interfaces for the matrix buffer, string buffer and message queue do not send messages because they are either without precondition or a part of the system needed to show the message. The method makes it possible to choose how you want errors to be shown depending on what type of application you are making. It is preferred to assert false or use a breakpoint after getting an error message so that you can see what line the error came from using the call stack.

When releasing your application, you can ignore error messages to save preformance and just let the first 32 errors be shown before exiting so that the user can send a bug report.

int Message_GetCount(void);

Returns the number of remaining messages from 0 to 32.

void Message_GetContent_OutSB(void);

Puts the first message's text in the string buffer.

Removes the first message from the queue.