Package imgui.assertion
Class ImAssertCallback
java.lang.Object
imgui.assertion.ImAssertCallback
Callback for native IM_ASSERT calls.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ImAssertCallback
public ImAssertCallback()
-
-
Method Details
-
imAssert
Called from native code to bring the callback into java side. Will force the application to terminate with exit code 1 after forwarding the callback, this is required, otherwise if execution is returned to the native layer, a EXCEPTION_ACCESS_VIOLATION will be thrown. If the callback throws an exception, it will be caught and printed along with a warning to prevent execution from returning to the native layer.- Parameters:
assertion- The assertion stringline- The line number of the assertion in the source filefile- The source file where the assertion occurred
-
imAssertCallback
The assertion callback from ImGui. Do not throw an exception within this callback, to prevent execution from returned to the native layer and cause a EXCEPTION_ACCESS_VIOLATION, the callback will catch any exceptions and print a warning.There is no way to catch the assertion and continue execution. You may however call
System.exit(code)with your own exit code.- Parameters:
assertion- The assertion stringline- The line number of the assertion in the source filefile- The source file where the assertion occurred
-