diff --git a/ragconnect.base/src/main/resources/mappingApplication.mustache b/ragconnect.base/src/main/resources/mappingApplication.mustache index 064004b94886c155be883e7b186557c6fa87d38c..47ec31ee58b27485a51e2b7e3a7de196cbe130f3 100644 --- a/ragconnect.base/src/main/resources/mappingApplication.mustache +++ b/ragconnect.base/src/main/resources/mappingApplication.mustache @@ -3,6 +3,9 @@ try { {{#InnerMappingDefinitions}} {{^last}}{{toType}} {{/last}}{{outputVarName}} = {{methodName}}({{inputVarName}}); {{/InnerMappingDefinitions}} +} catch (RagConnectRejectMappingException e) { + // do not print message in case of rejection + {{preemptiveReturn}} } catch (Exception e) { e.printStackTrace(); {{preemptiveReturn}} diff --git a/ragconnect.base/src/main/resources/ragconnect.mustache b/ragconnect.base/src/main/resources/ragconnect.mustache index 35db18c4335f7f0aafd503a0dcd88148408002a9..b834bd99b025a58c2a4daabb851a3f10fe413035 100644 --- a/ragconnect.base/src/main/resources/ragconnect.mustache +++ b/ragconnect.base/src/main/resources/ragconnect.mustache @@ -17,6 +17,11 @@ aspect RagConnect { {{> sendDefinition}} {{/TypeSendDefinitions}} + class RagConnectRejectMappingException extends RuntimeException {} + private static void ASTNode.reject() { + throw new RagConnectRejectMappingException(); + } + {{#MappingDefinitions}} {{#isUsed}} {{> mappingDefinition}}