IndexError Handlingasmjit::DebugUtils
asmjit::DebugUtils Namespace Reference

Debugging utilities.

Functions

Error DebugUtils::errored(
Error err
)constexprstaticnoexcept[¶]

Returns the error err passed.

Provided for debugging purposes. Putting a breakpoint inside errored can help with tracing the origin of any error reported / returned by AsmJit.

const char* DebugUtils::errorAsString(
Error err
)noexcept[¶]

Returns a printable version of asmjit::Error code.

void DebugUtils::debugOutput(
const char* str
)noexcept[¶]

Called to output debugging message(s).

void DebugUtils::assertionFailed(
const char* file,
int line,
const char* msg
)noexcept[¶]

Called on assertion failure.

Parameters
fileSource file name where it happened.
lineLine in the source file.
msgMessage to display.

If you have problems with assertion failures a breakpoint can be put at assertionFailed() function (asmjit/core/globals.cpp). A call stack will be available when such assertion failure is triggered. AsmJit always returns errors on failures, assertions are a last resort and usually mean unrecoverable state due to out of range array access or totally invalid arguments like nullptr where a valid pointer should be provided, etc...