Merge branch 'dot_error' into 'master'

Filter out "Dot indexing is not supported for variables of this type." error...

See merge request Dynare/dynare!1846
time-shift
Sébastien Villemot 2021-05-06 14:49:39 +00:00
commit ca43df16e0
1 changed files with 7 additions and 2 deletions

View File

@ -280,8 +280,13 @@ clear(['+' fname '/driver'])
try
evalin('base',[fname '.driver']) ;
catch ME
diary off
rethrow(ME)
W = evalin('base','whos');
diary off
if ismember(fname,[W(:).name])
error('Your base workspace already contains a variable with the same name as the mod-file.\nYou need to delete it or rename the mod-file.')
else
rethrow(ME)
end
end
diary off