summaryrefslogtreecommitdiffstats
path: root/src/vpp-api/java/jvpp/gen/jvppgen
diff options
context:
space:
mode:
authorMarek Gradzki <mgradzki@cisco.com>2017-08-24 08:57:43 +0200
committerDave Wallace <dwallacelf@gmail.com>2017-08-24 14:56:50 +0000
commit5c04ad09603f40f071e4b4ad79add8d2619977bf (patch)
tree011dc9a44881a8880361d4b3777399ada937fdf1 /src/vpp-api/java/jvpp/gen/jvppgen
parentc6e8c5c6581b9b9b7a4f64fe1583d641affed173 (diff)
jvpp: use (*env)->ExceptionClear before calling (*env)->ExceptionOccurred
Change-Id: I6cca455ead986cb8a507c84957a97a40b733b16c Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'src/vpp-api/java/jvpp/gen/jvppgen')
-rw-r--r--src/vpp-api/java/jvpp/gen/jvppgen/jvpp_c_gen.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/vpp-api/java/jvpp/gen/jvppgen/jvpp_c_gen.py b/src/vpp-api/java/jvpp/gen/jvppgen/jvpp_c_gen.py
index 7e59cc4c785..8761eb136c2 100644
--- a/src/vpp-api/java/jvpp/gen/jvppgen/jvpp_c_gen.py
+++ b/src/vpp-api/java/jvpp/gen/jvppgen/jvpp_c_gen.py
@@ -227,10 +227,13 @@ static void vl_api_${handler_name}_t_handler (vl_api_${handler_name}_t * mp)
${plugin_name}_main_t *plugin_main = &${plugin_name}_main;
JNIEnv *env = jvpp_main.jenv;
jthrowable exc;
-
$err_handler
jmethodID constructor = (*env)->GetMethodID(env, ${class_ref_name}Class, "<init>", "()V");
+
+ // User does not have to provide callbacks for all VPP messages.
+ // We are ignoring messages that are not supported by user.
+ (*env)->ExceptionClear(env); // just in case exception occurred in different place and was not properly cleared
jmethodID callbackMethod = (*env)->GetMethodID(env, plugin_main->callbackClass, "on${dto_name}", "(Lio/fd/vpp/jvpp/${plugin_name}/dto/${dto_name};)V");
exc = (*env)->ExceptionOccurred(env);
if (exc) {