Module exceptions

Source

Structs§

JPanicException
Wrapper for JObjects that implement io.github.gedgygedgy.rust.panic.PanicException. Provides methods to get and take the associated Any.
TryCatchResult
Result from try_block. This object can be chained into catch calls to catch exceptions. When finished with the try/catch sequence, the result can be obtained from result.

Functions§

throw_unwind
Calls the given closure. If it panics, catch the unwind, wrap it in a io.github.gedgygedgy.rust.panic.PanicException, and throw it.
try_block
Attempt to execute a block of JNI code. If the code causes an exception to be thrown, it will be stored in the resulting TryCatchResult for matching with catch. If an exception was already being thrown before try_block is called, the given block will not be executed, nor will any of the catch blocks.