Skip to content

Commit

Permalink
Correctly catch mex compile errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
mpf committed Jun 8, 2020
1 parent 607319f commit 361a598
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions spgsetup.m
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,20 @@
mex oneProjectorMex.c oneProjectorCore.c heap.c -output oneProjectorMex -DNDEBUG
fprintf('Successfully compiled oneProjector.\n');
cd(root)
catch
catch err
cd(root)
fprintf('Could not compile oneProjector.');
fprintf('You can still use the slower ".m" version.');
rethrow(lasterr);
rethrow(err);
end

try
cd('private')
mex productBMex.c -DNDEBUG
fprintf('Successfully compiled productB.\n');
cd(root)
catch
catch err
cd(root)
fprintf('Could not compile productB.');
rethrow(lasterr);
rethrow(err);
end

0 comments on commit 361a598

Please sign in to comment.