Skip to content
Snippets Groups Projects
Commit 08518331 authored by Federico Felici's avatar Federico Felici
Browse files

robustify failed compliation to rethrow error

parent 3487a240
No related branches found
No related tags found
No related merge requests found
......@@ -403,11 +403,14 @@ classdef SCDclass_algo
function compile(obj)
try
eval(sprintf('%s([],[],[],''compile'')',obj.modelname));
catch
eval(sprintf('%s([],[],[],''term'')',obj.modelname));
catch ME
try
eval(sprintf('%s([],[],[],''term'')',obj.modelname)); % terminate if necessary
catch
rethrow(ME); % rethrow error so we can see it
end
end
eval(sprintf('%s([],[],[],''term'')',obj.modelname));
eval(sprintf('%s([],[],[],''term'')',obj.modelname)); % terminate is successful
end
function sim(obj)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment