Skip to content
Snippets Groups Projects
Verified Commit d3678edb authored by Stéphane Adjemian's avatar Stéphane Adjemian
Browse files

Add try/catch block (cherry-picking failures).

Close and delete generated file if cherry picking fails for any reason.
parent ec3127a0
No related branches found
No related tags found
No related merge requests found
Pipeline #5824 passed
...@@ -73,6 +73,7 @@ plist = {}; ...@@ -73,6 +73,7 @@ plist = {};
elist = {}; elist = {};
xlist = {}; xlist = {};
try
for i=1:length(eqtags) for i=1:length(eqtags)
rhs = []; rhs = [];
lhs = []; lhs = [];
...@@ -201,6 +202,14 @@ for i=1:length(eqtags) ...@@ -201,6 +202,14 @@ for i=1:length(eqtags)
elist = union(elist, enames); elist = union(elist, enames);
xlist = union(xlist, xnames); xlist = union(xlist, xnames);
end end
catch e
fclose(fid);
fprintf(2, '%s\n', e.message)
fprintf(2, 'Delete ''%s'' file.\n', sprintf('%s/model.inc', outfold))
delete(sprintf('%s/model.inc', outfold))
return
end
fclose(fid); fclose(fid);
% Export parameters % Export parameters
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment