You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by sr...@apache.org on 2022/07/01 14:01:43 UTC
[plc4x] 06/06: feat(codegen/plc4j): add information of the type into the error message
This is an automated email from the ASF dual-hosted git repository.
sruehl pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git
commit 8636f3fe8eb11ba7e6530da8435d0f40f25d47a5
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Fri Jul 1 16:01:27 2022 +0200
feat(codegen/plc4j): add information of the type into the error message
---
.../src/main/resources/templates/java/complex-type-template.java.ftlh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/code-generation/language-java/src/main/resources/templates/java/complex-type-template.java.ftlh b/code-generation/language-java/src/main/resources/templates/java/complex-type-template.java.ftlh
index 471b8deda..c23bd040d 100644
--- a/code-generation/language-java/src/main/resources/templates/java/complex-type-template.java.ftlh
+++ b/code-generation/language-java/src/main/resources/templates/java/complex-type-template.java.ftlh
@@ -742,7 +742,7 @@ public<#if type.isDiscriminatedParentTypeDefinition()> abstract</#if> class ${ty
}<#sep> else </#sep>
</#list>
if (builder == null) {
- throw new ParseException("Unsupported case for discriminated type");
+ throw new ParseException("Unsupported case for discriminated type"<#if switchField.getDiscriminatorExpressions()?has_content>+" parameters ["<#list switchField.getDiscriminatorExpressions() as discriminatorExpression>+"${discriminatorExpression.stringRepresentation()}="+${helper.toParseExpression(null, null, discriminatorExpression, parserArguments)}<#sep>+" "</#sep></#list>+"]"</#if>);
}
<#break>
<#case "unknown">