From 6fa979ff5b5cb729e669ed29a8ef0729c2046585 Mon Sep 17 00:00:00 2001 From: Baptiste Lesquoy Date: Fri, 14 Jun 2024 12:24:32 +0700 Subject: [PATCH] fixes #214 --- .../gama/core/kernel/batch/exploration/Exploration.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gama.core/src/gama/core/kernel/batch/exploration/Exploration.java b/gama.core/src/gama/core/kernel/batch/exploration/Exploration.java index 633a77fd68..b528302403 100644 --- a/gama.core/src/gama/core/kernel/batch/exploration/Exploration.java +++ b/gama.core/src/gama/core/kernel/batch/exploration/Exploration.java @@ -50,7 +50,6 @@ import gama.gaml.descriptions.IDescription; import gama.gaml.expressions.IExpression; import gama.gaml.operators.Cast; -import gama.gaml.operators.Random; import gama.gaml.types.GamaDateType; import gama.gaml.types.GamaFloatType; import gama.gaml.types.GamaPointType; @@ -311,8 +310,10 @@ public Object value() { private List buildParameterFromMap(final IScope scope, final List sets, final int index) { IExpression psexp = getFacet(IKeyword.WITH); - if (psexp.getDenotedType() != Types.LIST) throw GamaRuntimeException.error( - "You cannot use " + IKeyword.WITH + " facet without input a list of maps as parameters inputs", scope); + if ( !Types.LIST.isAssignableFrom(psexp.getDenotedType())) { + GAMA.reportAndThrowIfNeeded(scope, GamaRuntimeException.error( + "The facet '" + IKeyword.WITH + "' must be provided with a list of maps", scope), true); + } List> parameterSets = Cast.asList(scope, psexp.value(scope)); for (Map parameterSet : parameterSets) {