From 5841965c3b16153f8bc0c7103bb02fb297ebf6df Mon Sep 17 00:00:00 2001 From: paulklint Date: Mon, 25 Nov 2024 22:32:55 +0100 Subject: [PATCH] Transform exception of getModuleName into error message --- .../library/lang/rascalcore/check/Checker.rsc | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/org/rascalmpl/core/library/lang/rascalcore/check/Checker.rsc b/src/org/rascalmpl/core/library/lang/rascalcore/check/Checker.rsc index c9d05153..002b2594 100644 --- a/src/org/rascalmpl/core/library/lang/rascalcore/check/Checker.rsc +++ b/src/org/rascalmpl/core/library/lang/rascalcore/check/Checker.rsc @@ -143,13 +143,17 @@ ModuleStatus rascalTModelForLocs( } for (mloc <- mlocs) { - m = getModuleName(mloc, pcfg); - if(isModuleLocationInLibs(m, mloc, pcfg)){ - ms.status[m] ? {} += {rsc_not_found()}; + try { + m = getModuleName(mloc, pcfg); + if(isModuleLocationInLibs(m, mloc, pcfg)){ + ms.status[m] ? {} += {rsc_not_found()}; + } + topModuleNames += {m}; + ms.moduleLocs[m] = mloc; + msgs += toList(ms.messages[m] ? {}); + } catch e:{ + msgs += error(e, mloc); } - topModuleNames += {m}; - ms.moduleLocs[m] = mloc; - msgs += toList(ms.messages[m] ? {}); } str jobName = "";