Kanzi  3.9.9
Kanzi Engine C++ API
kanzi::JavaException Class Reference

Exception class that can be used to wrap a Java generated exception. More...

#include <kanzi/java/java_exception.hpp>

Inheritance diagram for kanzi::JavaException:
[legend]

Public Member Functions

 JavaException (JNIEnv *jenv, jthrowable throwable)
 Constructs an exception from a Java throwable. More...
 
 JavaException (JNIEnv *jenv, jthrowable throwable, const string &message)
 Constructs an exception from a Java throwable with an added message. More...
 
void throwJavaException (JNIEnv *jenv) const
 Reconstruct and raise/throw the Java Exception that caused the DirectorException Note that any error in the JNI exception handling results in a Java RuntimeException. More...
 
const char * what () const noexcept override
 Gets the message describing the exception. More...
 
 ~JavaException ()=default
 Destructor. More...
 

Static Public Member Functions

static void throwNativeException (JNIEnv *jenv, jthrowable throwable)
 Create and throw the JavaException. More...
 

Detailed Description

Exception class that can be used to wrap a Java generated exception.

Based on the generated code for Swig::DirectorException as generated in Swig 4.0

Constructor & Destructor Documentation

kanzi::JavaException::JavaException ( JNIEnv *  jenv,
jthrowable  throwable 
)

Constructs an exception from a Java throwable.

kanzi::JavaException::JavaException ( JNIEnv *  jenv,
jthrowable  throwable,
const string &  message 
)
explicit

Constructs an exception from a Java throwable with an added message.

kanzi::JavaException::~JavaException ( )
default

Destructor.

Member Function Documentation

const char* kanzi::JavaException::what ( ) const
inlineoverridenoexcept

Gets the message describing the exception.

void kanzi::JavaException::throwJavaException ( JNIEnv *  jenv) const

Reconstruct and raise/throw the Java Exception that caused the DirectorException Note that any error in the JNI exception handling results in a Java RuntimeException.

static void kanzi::JavaException::throwNativeException ( JNIEnv *  jenv,
jthrowable  throwable 
)
static

Create and throw the JavaException.


The documentation for this class was generated from the following file: