From 357e19a07fd841d4f95597eb2c9dc69bcf1d8ba5 Mon Sep 17 00:00:00 2001 From: Volker Birk Date: Fri, 21 Aug 2015 11:30:25 +0200 Subject: [PATCH] throwing exception on error --- src/gen_cpp_Engine.ysl2 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gen_cpp_Engine.ysl2 b/src/gen_cpp_Engine.ysl2 index 057ff8c..df88b67 100644 --- a/src/gen_cpp_Engine.ysl2 +++ b/src/gen_cpp_Engine.ysl2 @@ -12,6 +12,7 @@ tstylesheet { #include #include #include "org_pEp_jniadapter_«@name».h" + #include "throw_pEp_exception.hh" #include "jniutils.hh" using namespace pEp::JNIAdapter; @@ -41,6 +42,11 @@ tstylesheet { `` apply "parm[creates|returns]", mode=out PEP_STATUS status = ::«@name»(session`apply "parm", mode=call``if "@name = 'encrypt_message'" > , PEP_enc_PEP`); + if ((status > PEP_STATUS_OK && status < PEP_UNENCRYPTED) |`> |` + status >= PEP_TRUSTWORD_NOT_FOUND) { + throw_pEp_Exception(env, status); + return NULL; + } ||