Index: /issm/trunk-jpl/src/m/coordsystems/gmtmask.m
===================================================================
--- /issm/trunk-jpl/src/m/coordsystems/gmtmask.m	(revision 21079)
+++ /issm/trunk-jpl/src/m/coordsystems/gmtmask.m	(revision 21080)
@@ -40,5 +40,8 @@
 
 	%figure out which vertices are on the ocean, which one on the continent:
-	system('gmt gmtselect ./all_vertices.txt -h0 -Df -R0/360/-90/90  -A0 -JQ180/200 -Nk/s/s/k/s > ./oce_vertices.txt');
+	[status,result] = system('gmt gmtselect ./all_vertices.txt -h0 -Df -R0/360/-90/90  -A0 -JQ180/200 -Nk/s/s/k/s > ./oce_vertices.txt');
+	if status~=0,
+		error(result);
+	end
 
 	%reset DYLD_LIBRARY_PATH to what it was: 
