Skip to content
Snippets Groups Projects
Commit f43ee91e authored by Johannes Pfeifer's avatar Johannes Pfeifer
Browse files

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

Filter out "Dot indexing is not supported for variables of this type." error if variable conflicts with namespace
parent 6fe97182
Branches
Tags
1 merge request!1846Filter out "Dot indexing is not supported for variables of this type." error...
...@@ -280,9 +280,14 @@ clear(['+' fname '/driver']) ...@@ -280,9 +280,14 @@ clear(['+' fname '/driver'])
try try
evalin('base',[fname '.driver']) ; evalin('base',[fname '.driver']) ;
catch ME catch ME
W = evalin('base','whos');
diary off 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) rethrow(ME)
end end
end
diary off diary off
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment