| JamaicaVM -- User Documentation: The Virtual Machine for Real-time and Embedded Systems | ||
|---|---|---|
| Prev | Chapter 9. The Jamaica Binary Interface | Next |
The macro JAMAICA_THROW_EXCEPTION permits to throw an exception from within JBI code. The exception's class and an optional message have to be provided to the macro as illustrated in this code example:
if ((index < 0) || (index >= len)) {
JAMAICA_THROW_EXCEPTION(ct,
"java/lang/ArrayIndexOutOfBoundsException",
"index parameter out of range");
}
|