From a2281d9238933761e0a55c41a6999d542228a97c Mon Sep 17 00:00:00 2001 From: OszkarSemerath Date: Thu, 11 Oct 2018 19:21:48 +0200 Subject: Update error message for untranslated types in Viatra --- .../hu/bme/mit/inf/dslreasoner/viatra2logic/Viatra2Logic.xtend | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/src/hu/bme/mit/inf/dslreasoner/viatra2logic/Viatra2Logic.xtend b/Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/src/hu/bme/mit/inf/dslreasoner/viatra2logic/Viatra2Logic.xtend index 0821db47..8a0ff3b3 100644 --- a/Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/src/hu/bme/mit/inf/dslreasoner/viatra2logic/Viatra2Logic.xtend +++ b/Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/src/hu/bme/mit/inf/dslreasoner/viatra2logic/Viatra2Logic.xtend @@ -296,7 +296,14 @@ class Viatra2Logic { def TypeReference getType(PParameter v, Map>> types, TracedOutput ecore2LogicTrace) { // If parameter type is specified then the specified type is used if(v.declaredUnaryType !== null) { - return transformTypeReference(v.declaredUnaryType,ecore2LogicTrace) + val res = transformTypeReference(v.declaredUnaryType,ecore2LogicTrace) + if(res === null) { + throw new AssertionError(''' + Unable to translate declared type «v.declaredUnaryType». + ''') + } else { + return res + } } // Otherwise, calculate the type based on the type of the variable in the bodies else { -- cgit v1.2.3-54-g00ecf