Index: /issm/trunk-jpl/src/modules/BamgConvertMesh/BamgConvertMesh.cpp
===================================================================
--- /issm/trunk-jpl/src/modules/BamgConvertMesh/BamgConvertMesh.cpp	(revision 12496)
+++ /issm/trunk-jpl/src/modules/BamgConvertMesh/BamgConvertMesh.cpp	(revision 12497)
@@ -44,17 +44,17 @@
 	/*Check inputs*/
 	if (nels<0){
-		_error_("Number of elements must be positive, check index number of lines");
+		_error2_("Number of elements must be positive, check index number of lines");
 	}
 	if (nods<0){
-		_error_("Number of nods must be positive, check x and y sizes");
+		_error2_("Number of nods must be positive, check x and y sizes");
 	}
 	if (index_rows!=3){
-		_error_("index should have 3 columns");
+		_error2_("index should have 3 columns");
 	}
 	if (y_rows!=nods){
-		_error_("x and y do not have the same length");
+		_error2_("x and y do not have the same length");
 	}
 	if (x_cols>1 || y_cols>1){
-		_error_("x and y should have only one column");
+		_error2_("x and y should have only one column");
 	}
 
Index: /issm/trunk-jpl/src/modules/BamgTriangulate/BamgTriangulate.cpp
===================================================================
--- /issm/trunk-jpl/src/modules/BamgTriangulate/BamgTriangulate.cpp	(revision 12496)
+++ /issm/trunk-jpl/src/modules/BamgTriangulate/BamgTriangulate.cpp	(revision 12497)
@@ -32,7 +32,7 @@
 
 	/*Check inputs*/
-	if(y_rows!=nods)         _error_("x and y do not have the same length");
-	if(x_cols>1 || y_cols>1) _error_("x and y should have only one column");
-	if(nods<3)               _error_("At least 3 points are required");
+	if(y_rows!=nods)         _error2_("x and y do not have the same length");
+	if(x_cols>1 || y_cols>1) _error2_("x and y should have only one column");
+	if(nods<3)               _error2_("At least 3 points are required");
 
 	/* Run core computations: */
Index: /issm/trunk-jpl/src/modules/Chaco/Chaco.cpp
===================================================================
--- /issm/trunk-jpl/src/modules/Chaco/Chaco.cpp	(revision 12496)
+++ /issm/trunk-jpl/src/modules/Chaco/Chaco.cpp	(revision 12497)
@@ -42,5 +42,5 @@
 
 	#ifndef _HAVE_CHACO_ //only works if dakota library has been compiled in.
-	_error_("Chaco not available! Cannot carry out Chaco partitioning!");
+	_error2_("Chaco not available! Cannot carry out Chaco partitioning!");
 	#endif
 
Index: /issm/trunk-jpl/src/modules/ContourToMesh/ContourToMesh.cpp
===================================================================
--- /issm/trunk-jpl/src/modules/ContourToMesh/ContourToMesh.cpp	(revision 12496)
+++ /issm/trunk-jpl/src/modules/ContourToMesh/ContourToMesh.cpp	(revision 12497)
@@ -47,5 +47,5 @@
 	if(nlhs!=1 && nlhs!=2){
 		ContourToMeshUsage();
-		_error_("usage. See above");
+		_error2_("usage. See above");
 	}
 	#endif
@@ -53,5 +53,5 @@
 	if(nrhs!=NRHS){
 		ContourToMeshUsage();
-		_error_("usage. See above");
+		_error2_("usage. See above");
 	}
 
@@ -82,5 +82,5 @@
 		WriteData(PLHS1,in_elem);
 	}
-	else _error_("wrong interpolation type");
+	else _error2_("wrong interpolation type");
 
 	/*end module: */
Index: /issm/trunk-jpl/src/modules/EnumToString/EnumToString.cpp
===================================================================
--- /issm/trunk-jpl/src/modules/EnumToString/EnumToString.cpp	(revision 12496)
+++ /issm/trunk-jpl/src/modules/EnumToString/EnumToString.cpp	(revision 12497)
@@ -12,5 +12,5 @@
 	/*checks on arguments on the matlab side: */
 	if(nrhs!=NRHS){
-		EnumToStringUsage(); _error_("usage. See above");
+		EnumToStringUsage(); _error2_("usage. See above");
 	}
 
Index: /issm/trunk-jpl/src/modules/Exp2Kml/Exp2Kml.cpp
===================================================================
--- /issm/trunk-jpl/src/modules/Exp2Kml/Exp2Kml.cpp	(revision 12496)
+++ /issm/trunk-jpl/src/modules/Exp2Kml/Exp2Kml.cpp	(revision 12497)
@@ -25,8 +25,8 @@
 	/*checks on arguments on the matlab side: */
 	if (nlhs > NLHS) {
-		Exp2KmlUsage(); _error_("Exp2Kml usage error");
+		Exp2KmlUsage(); _error2_("Exp2Kml usage error");
 	}
 	if (nrhs < NRHS) {
-		Exp2KmlUsage(); _error_("Exp2Kml usage error");
+		Exp2KmlUsage(); _error2_("Exp2Kml usage error");
 	}
 
@@ -49,7 +49,7 @@
 
 	/*some checks*/
-	if (sgn !=+1 && sgn !=-1) _error_("Hemisphere sgn=%d must be +1 (north) or -1 (south).",sgn);
-	if (fabs(cm)      > 180.) _error_("Central meridian cm=%g must be between -180 (west) and +180 (east) degrees.",cm);
-	if (sp < 0. || sp >  90.) _error_("Standard parallel sp=%g must be between 0 and 90 degrees (in specified hemisphere).",sp);
+	if (sgn !=+1 && sgn !=-1) _error2_("Hemisphere sgn=" << sgn << " must be +1 (north) or -1 (south).");
+	if (fabs(cm)      > 180.) _error2_("Central meridian cm=" << cm << " must be between -180 (west) and +180 (east) degrees.");
+	if (sp < 0. || sp >  90.) _error2_("Standard parallel sp=" << sp << " must be between 0 and 90 degrees (in specified hemisphere).");
 
 	/* Run core computations: */
Index: /issm/trunk-jpl/src/modules/InternalFront/InternalFront.cpp
===================================================================
--- /issm/trunk-jpl/src/modules/InternalFront/InternalFront.cpp	(revision 12496)
+++ /issm/trunk-jpl/src/modules/InternalFront/InternalFront.cpp	(revision 12497)
@@ -26,11 +26,11 @@
 	/*Fetch required fields*/
 	FetchData(&numberofelements,mxGetAssignedField(MODEL,0,"numberofelements"));
-	if(numberofelements<=0) _error_("No elements found in the model");
+	if(numberofelements<=0) _error2_("No elements found in the model");
 	FetchData(&elements,&M,&N,mxGetAssignedField(MODEL,0,"elements"));
-	if(M!=numberofelements || N!=3) _error_("Field 'elements' should be of size [md.numberofelements 3]");
+	if(M!=numberofelements || N!=3) _error2_("Field 'elements' should be of size [md.numberofelements 3]");
 	FetchData(&elementonwater,&M,&N,mxGetAssignedField(MODEL,0,"elementonwater"));
-	if(M!=numberofelements || N!=1) _error_("Field 'elementonwater' should be of size [md.numberofelements 1]");
+	if(M!=numberofelements || N!=1) _error2_("Field 'elementonwater' should be of size [md.numberofelements 1]");
 	FetchData(&elementconnectivity,&M,&N,mxGetAssignedField(MODEL,0,"elementconnectivity"));
-	if(M!=numberofelements || N!=3) _error_("Field 'elementconnectivity' should be of size [md.numberofelements 3]");
+	if(M!=numberofelements || N!=3) _error2_("Field 'elementconnectivity' should be of size [md.numberofelements 3]");
 
 	/*Allocate and initialize all variables*/
Index: /issm/trunk-jpl/src/modules/InterpFromGridToMesh/InterpFromGridToMesh.cpp
===================================================================
--- /issm/trunk-jpl/src/modules/InterpFromGridToMesh/InterpFromGridToMesh.cpp	(revision 12496)
+++ /issm/trunk-jpl/src/modules/InterpFromGridToMesh/InterpFromGridToMesh.cpp	(revision 12497)
@@ -46,5 +46,5 @@
 	if((nlhs!=NLHS) || (nrhs!=6 && nrhs!=7)){
 		InterpFromGridToMeshUsage();
-		_error_("usage. See above");
+		_error2_("usage. See above");
 	}
 
Index: /issm/trunk-jpl/src/modules/InterpFromMesh2d/InterpFromMesh2d.cpp
===================================================================
--- /issm/trunk-jpl/src/modules/InterpFromMesh2d/InterpFromMesh2d.cpp	(revision 12496)
+++ /issm/trunk-jpl/src/modules/InterpFromMesh2d/InterpFromMesh2d.cpp	(revision 12497)
@@ -69,9 +69,9 @@
 	if(nlhs!=NLHS){
 		InterpFromMesh2dUsage();
-		_error_("InterpFromMeshToMesh2dUsage usage error");
+		_error2_("InterpFromMeshToMesh2dUsage usage error");
 	}
 	if((nrhs!=6) && (nrhs!=7) && (nrhs!=8)){
 		InterpFromMesh2dUsage();
-		_error_("InterpFromMeshToMesh2dUsage usage error");
+		_error2_("InterpFromMeshToMesh2dUsage usage error");
 	}
 
@@ -131,8 +131,8 @@
 	/*some checks*/
 	if (x_data_rows!=y_data_rows){
-		_error_("vectors x and y should have the same length!");
+		_error2_("vectors x and y should have the same length!");
 	}
 	if (x_prime_rows!=y_prime_rows){
-		_error_("vectors x_prime and y_prime should have the same length!");
+		_error2_("vectors x_prime and y_prime should have the same length!");
 	}
 	
Index: /issm/trunk-jpl/src/modules/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp
===================================================================
--- /issm/trunk-jpl/src/modules/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp	(revision 12496)
+++ /issm/trunk-jpl/src/modules/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp	(revision 12497)
@@ -39,5 +39,5 @@
 	if(nlhs!=NLHS){
 		InterpFromMeshToMesh2dUsage();
-		_error_("InterpFromMeshToMesh2dUsage usage error");
+		_error2_("InterpFromMeshToMesh2dUsage usage error");
 	}
 	#endif
@@ -45,5 +45,5 @@
 	if((nrhs!=6) & (nrhs!=8)){
 		InterpFromMeshToMesh2dUsage();
-		_error_("InterpFromMeshToMesh2dUsage usage error");
+		_error2_("InterpFromMeshToMesh2dUsage usage error");
 	}
 
@@ -71,11 +71,11 @@
 	/*some checks*/
 	if (x_data_rows!=y_data_rows){
-		_error_("vectors x and y should have the same length!");
+		_error2_("vectors x and y should have the same length!");
 	}
 	if (x_interp_rows!=y_interp_rows){
-		_error_("vectors x_interp and y_interp should have the same length!");
+		_error2_("vectors x_interp and y_interp should have the same length!");
 	}
 	if (index_cols!=3){
-		_error_("index should have 3 columns (input provided has %i columns)",index_cols);
+		_error2_("index should have 3 columns (input provided has " << index_cols << " columns)");
 	}
 
Index: /issm/trunk-jpl/src/modules/InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.cpp
===================================================================
--- /issm/trunk-jpl/src/modules/InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.cpp	(revision 12496)
+++ /issm/trunk-jpl/src/modules/InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.cpp	(revision 12497)
@@ -76,8 +76,8 @@
 	/*some checks*/
 	if (x_data_rows!=y_data_rows || x_data_rows!=z_data_rows){
-		_error_("vectors x, y and z should have the same length!");
+		_error2_("vectors x, y and z should have the same length!");
 	}
 	if (x_prime_rows!=y_prime_rows || x_prime_rows!=z_prime_rows){
-		_error_("vectors x_prime, y_prime and z_prime should have the same length!");
+		_error2_("vectors x_prime, y_prime and z_prime should have the same length!");
 	}
 	/*get number of elements and number of nodes in the data*/
Index: /issm/trunk-jpl/src/modules/KMLFileRead/KMLFileRead.cpp
===================================================================
--- /issm/trunk-jpl/src/modules/KMLFileRead/KMLFileRead.cpp	(revision 12496)
+++ /issm/trunk-jpl/src/modules/KMLFileRead/KMLFileRead.cpp	(revision 12497)
@@ -45,8 +45,8 @@
 	/*checks on arguments on the matlab side: */
 	if (nlhs > NLHS) {
-		KMLFileReadUsage(); _error_("KMLFileRead usage error");
+		KMLFileReadUsage(); _error2_("KMLFileRead usage error");
 	}
 	if (nrhs < NRHS) {
-		KMLFileReadUsage(); _error_("KMLFileRead usage error");
+		KMLFileReadUsage(); _error2_("KMLFileRead usage error");
 	}
 
Index: /issm/trunk-jpl/src/modules/KMLMeshWrite/KMLMeshWrite.cpp
===================================================================
--- /issm/trunk-jpl/src/modules/KMLMeshWrite/KMLMeshWrite.cpp	(revision 12496)
+++ /issm/trunk-jpl/src/modules/KMLMeshWrite/KMLMeshWrite.cpp	(revision 12497)
@@ -40,8 +40,8 @@
 	/*checks on arguments on the matlab side: */
 	if (nlhs > NLHS) {
-		KMLMeshWriteUsage(); _error_("KMLMeshWrite usage error");
+		KMLMeshWriteUsage(); _error2_("KMLMeshWrite usage error");
 	}
 	if (nrhs < NRHS) {
-		KMLMeshWriteUsage(); _error_("KMLMeshWrite usage error");
+		KMLMeshWriteUsage(); _error2_("KMLMeshWrite usage error");
 	}
 
@@ -87,15 +87,15 @@
 
 	if (nodecon && (mncon != nnodes))
-		_error_("Nodal connectivity table, if supplied, must be supplied for all nodes.");
+	  {_error2_("Nodal connectivity table, if supplied, must be supplied for all nodes.");}
 	else if (!nodecon)
 		mncon=nnodes;
 	if ((llat != nnodes) || (llng != nnodes) || (llat != llng))
-		_error_("Latitude and longitude vectors must be supplied for all nodes.");
+		_error2_("Latitude and longitude vectors must be supplied for all nodes.");
 	if (part && (lprt != nnodes))
-		_error_("Partitioning vector, if supplied, must be supplied for all nodes.");
+		_error2_("Partitioning vector, if supplied, must be supplied for all nodes.");
 	if (data && !((mdata == nnodes) || (mdata == melem)))
-		_error_("Data matrix, if supplied, must be supplied for all nodes or all elements.");
+		_error2_("Data matrix, if supplied, must be supplied for all nodes or all elements.");
 	if (cmap && (ncmap != 3))
-		_error_("Colormap matrix, if supplied, must have three columns for rgb.");
+		_error2_("Colormap matrix, if supplied, must have three columns for rgb.");
 	if (!strlen(filnam))
 		strcpy(filnam,"stdout");
Index: /issm/trunk-jpl/src/modules/KMLOverlay/KMLOverlay.cpp
===================================================================
--- /issm/trunk-jpl/src/modules/KMLOverlay/KMLOverlay.cpp	(revision 12496)
+++ /issm/trunk-jpl/src/modules/KMLOverlay/KMLOverlay.cpp	(revision 12497)
@@ -31,8 +31,8 @@
 	/*checks on arguments on the matlab side: */
 	if(nlhs>NLHS){
-		KMLOverlayUsage(); _error_("KMLOverlay usage error");
+		KMLOverlayUsage(); _error2_("KMLOverlay usage error");
 	}
 	if(nrhs<NRHS){
-		KMLOverlayUsage(); _error_("KMLOverlay usage error");
+		KMLOverlayUsage(); _error2_("KMLOverlay usage error");
 	}
 
@@ -51,7 +51,7 @@
 
 	/*some checks*/
-	if (nlat !=2) _error_("Latitudinal axes \"lataxis\" require two double values, not %d.",nlat);
-	if (nlong!=2) _error_("Longitudinal axes \"longaxis\" require two double values, not %d.",nlong);
-	if (!nimages) _error_("No image files provided.");
+	if (nlat !=2) _error2_("Latitudinal axes \"lataxis\" require two double values, not " << nlat << ".");
+	if (nlong!=2) _error2_("Longitudinal axes \"longaxis\" require two double values, not " << nlong << ".");
+	if (!nimages) _error2_("No image files provided.");
 
 	if ((int)dzip){
@@ -90,5 +90,5 @@
 		if (verbose) printf("%s\n",czip);
 
-		if (mexEvalString(czip)) _error_("Error zipping file \"%s\".",filkmz);
+		if (mexEvalString(czip)) _error2_("Error zipping file \"" << filkmz << "\".");
 		xfree((void**)&czip);
 		xfree((void**)&filkmz);
Index: /issm/trunk-jpl/src/modules/Kml2Exp/Kml2Exp.cpp
===================================================================
--- /issm/trunk-jpl/src/modules/Kml2Exp/Kml2Exp.cpp	(revision 12496)
+++ /issm/trunk-jpl/src/modules/Kml2Exp/Kml2Exp.cpp	(revision 12497)
@@ -22,8 +22,8 @@
 	/*checks on arguments on the matlab side: */
 	if (nlhs > NLHS) {
-		Kml2ExpUsage(); _error_("Kml2Exp usage error");
+		Kml2ExpUsage(); _error2_("Kml2Exp usage error");
 	}
 	if (nrhs < NRHS) {
-		Kml2ExpUsage(); _error_("Kml2Exp usage error");
+		Kml2ExpUsage(); _error2_("Kml2Exp usage error");
 	}
 
@@ -43,7 +43,7 @@
 
 	/*some checks*/
-	if (sgn !=+1 && sgn!= -1) _error_("Hemisphere sgn=%d must be +1 (north) or -1 (south).",sgn);
-	if (fabs(cm)      > 180.) _error_("Central meridian cm=%g must be between -180 (west) and +180 (east) degrees.",cm);
-	if (sp < 0. || sp >  90.) _error_("Standard parallel sp=%g must be between 0 and 90 degrees (in specified hemisphere).",sp);
+	if (sgn !=+1 && sgn!= -1) _error2_("Hemisphere sgn=" << sgn << " must be +1 (north) or -1 (south).");
+	if (fabs(cm)      > 180.) _error2_("Central meridian cm=" << cm << " must be between -180 (west) and +180 (east) degrees.");
+	if (sp < 0. || sp >  90.) _error2_("Standard parallel sp=" << sp << " must be between 0 and 90 degrees (in specified hemisphere).");
 
 	/* Run core computations: */
Index: /issm/trunk-jpl/src/modules/Kriging/Kriging.cpp
===================================================================
--- /issm/trunk-jpl/src/modules/Kriging/Kriging.cpp	(revision 12496)
+++ /issm/trunk-jpl/src/modules/Kriging/Kriging.cpp	(revision 12497)
@@ -22,13 +22,13 @@
 	/*checks on arguments on the matlab side: */
 	if (nrhs<NRHS || nlhs>NLHS){
-		KrigingUsage(); _error_("Kriging usage error");
+		KrigingUsage(); _error2_("Kriging usage error");
 	}
 
 	/*Fetch inputs: */
 	FetchData(&x,&n_obs,X);
-	FetchData(&y,&N,Y);                       if(n_obs!=N) _error_("x and y should have the same size");
-	FetchData(&observations,&N,OBSERVATIONS); if(n_obs!=N) _error_("x and observations should have the same size");
+	FetchData(&y,&N,Y);                       if(n_obs!=N) _error2_("x and y should have the same size");
+	FetchData(&observations,&N,OBSERVATIONS); if(n_obs!=N) _error2_("x and observations should have the same size");
 	FetchData(&x_interp,&M_interp,&N_interp,XINTERP);
-	FetchData(&y_interp,&M,&N,YINTERP);       if(N!=N_interp || M!=M_interp) _error_("x_interp and y_interp should have the same size");
+	FetchData(&y_interp,&M,&N,YINTERP);       if(N!=N_interp || M!=M_interp) _error2_("x_interp and y_interp should have the same size");
 	FetchData(&options,NRHS,nrhs,prhs);
 
Index: /issm/trunk-jpl/src/modules/Ll2xy/Ll2xy.cpp
===================================================================
--- /issm/trunk-jpl/src/modules/Ll2xy/Ll2xy.cpp	(revision 12496)
+++ /issm/trunk-jpl/src/modules/Ll2xy/Ll2xy.cpp	(revision 12497)
@@ -25,8 +25,8 @@
 	/*checks on arguments on the matlab side: */
 	if (nlhs > NLHS) {
-		Ll2xyUsage(); _error_("Ll2xy usage error");
+		Ll2xyUsage(); _error2_("Ll2xy usage error");
 	}
 	if (nrhs < NRHS) {
-		Ll2xyUsage(); _error_("Ll2xy usage error");
+		Ll2xyUsage(); _error2_("Ll2xy usage error");
 	}
 
@@ -47,9 +47,9 @@
 	/*some checks*/
 	if (verbose) printf("Checking inputs:\n");
-	if (nlat != nlon) _error_("Must have same number of lat[%d] and lon[%d] coordinates.",nlat,nlon);
+	if (nlat != nlon){_error2_("Must have same number of lat[" << nlat << "] and lon[" << nlon << "] coordinates.");}
 	else                ncoord=nlat;
-	if (sgn != +1 && sgn != -1) _error_("Hemisphere sgn=%d must be +1 (north) or -1 (south).",sgn);
-	if (fabs(cm)      > 180.) _error_("Central meridian cm=%g must be between -180 (west) and +180 (east) degrees.",cm);
-	if (sp < 0. || sp >  90.) _error_("Standard parallel sp=%g must be between 0 and 90 degrees (in specified hemisphere).",sp);
+	if (sgn != +1 && sgn != -1) _error2_("Hemisphere sgn=" << sgn << " must be +1 (north) or -1 (south).");
+	if (fabs(cm)      > 180.) _error2_("Central meridian cm=" << cm << " must be between -180 (west) and +180 (east) degrees.");
+	if (sp < 0. || sp >  90.) _error2_("Standard parallel sp=" << sp << " must be between 0 and 90 degrees (in specified hemisphere).");
 
 	x=(double*)mxMalloc(ncoord*sizeof(double));
Index: /issm/trunk-jpl/src/modules/MeshProfileIntersection/MeshProfileIntersection.cpp
===================================================================
--- /issm/trunk-jpl/src/modules/MeshProfileIntersection/MeshProfileIntersection.cpp	(revision 12496)
+++ /issm/trunk-jpl/src/modules/MeshProfileIntersection/MeshProfileIntersection.cpp	(revision 12497)
@@ -54,5 +54,5 @@
 	//index
 	FetchData(&double_index,&nel,&dummy,INDEX);
-	if(dummy!=3 && dummy!=6)_error_("element triangulation should be of 3 or 6 column width!");
+	if(dummy!=3 && dummy!=6)_error2_("element triangulation should be of 3 or 6 column width!");
 	index=(int*)xmalloc(nel*3*sizeof(int));
 	for(i=0;i<nel;i++){
Index: /issm/trunk-jpl/src/modules/Scotch/Scotch.cpp
===================================================================
--- /issm/trunk-jpl/src/modules/Scotch/Scotch.cpp	(revision 12496)
+++ /issm/trunk-jpl/src/modules/Scotch/Scotch.cpp	(revision 12497)
@@ -25,5 +25,5 @@
 
 #ifndef _HAVE_SCOTCH_ //only works if scotch library has been compiled in.
-	_error_("Scotch not available! Cannot carry out Scotch partitioning!");
+	_error2_("Scotch not available! Cannot carry out Scotch partitioning!");
 	#else
 
Index: /issm/trunk-jpl/src/modules/Shp2Kml/Shp2Kml.cpp
===================================================================
--- /issm/trunk-jpl/src/modules/Shp2Kml/Shp2Kml.cpp	(revision 12496)
+++ /issm/trunk-jpl/src/modules/Shp2Kml/Shp2Kml.cpp	(revision 12497)
@@ -25,5 +25,5 @@
 
 	#ifndef _HAVE_SHAPELIB_ //only works if shapelib library has been compiled in.
-	_error_("Shapelib not available! Cannot carry out shp file translation!");
+	_error2_("Shapelib not available! Cannot carry out shp file translation!");
 	#endif
 
@@ -33,8 +33,8 @@
 	/*checks on arguments on the matlab side: */
 	if (nlhs > NLHS) {
-		Shp2KmlUsage(); _error_("Shp2Kml usage error");
+		Shp2KmlUsage(); _error2_("Shp2Kml usage error");
 	}
 	if (nrhs < NRHS) {
-		Shp2KmlUsage(); _error_("Shp2Kml usage error");
+		Shp2KmlUsage(); _error2_("Shp2Kml usage error");
 	}
 
@@ -54,7 +54,7 @@
 
 	/*some checks*/
-	if (sgn < -1 || sgn > +1) _error_("Hemisphere sgn=%d must be +1 (north), -1 (south), or 0 (no translation).",sgn);
-	if (fabs(cm)      > 180.) _error_("Central meridian cm=%g must be between -180 (west) and +180 (east) degrees.",cm);
-	if (sp < 0. || sp >  90.) _error_("Standard parallel sp=%g must be between 0 and 90 degrees (in specified hemisphere).",sp);
+	if (sgn < -1 || sgn > +1) _error2_("Hemisphere sgn=" << sgn << " must be +1 (north), -1 (south), or 0 (no translation).");
+	if (fabs(cm)      > 180.) _error2_("Central meridian cm=" << cm << " must be between -180 (west) and +180 (east) degrees.");
+	if (sp < 0. || sp >  90.) _error2_("Standard parallel sp=" << sp << " must be between 0 and 90 degrees (in specified hemisphere).");
 
 	/* Run core computations: */
Index: /issm/trunk-jpl/src/modules/StringToEnum/StringToEnum.cpp
===================================================================
--- /issm/trunk-jpl/src/modules/StringToEnum/StringToEnum.cpp	(revision 12496)
+++ /issm/trunk-jpl/src/modules/StringToEnum/StringToEnum.cpp	(revision 12497)
@@ -12,5 +12,5 @@
 	/*checks on arguments on the matlab side: */
 	if(nrhs!=NRHS){
-		StringToEnumUsage(); _error_("usage. See above");
+		StringToEnumUsage(); _error2_("usage. See above");
 	}
 
Index: /issm/trunk-jpl/src/modules/Xy2ll/Xy2ll.cpp
===================================================================
--- /issm/trunk-jpl/src/modules/Xy2ll/Xy2ll.cpp	(revision 12496)
+++ /issm/trunk-jpl/src/modules/Xy2ll/Xy2ll.cpp	(revision 12497)
@@ -24,8 +24,8 @@
 	/*checks on arguments on the matlab side: */
 	if (nlhs > NLHS) {
-		Xy2llUsage(); _error_("Xy2ll usage error");
+		Xy2llUsage(); _error2_("Xy2ll usage error");
 	}
 	if (nrhs < NRHS) {
-		Xy2llUsage(); _error_("Xy2ll usage error");
+		Xy2llUsage(); _error2_("Xy2ll usage error");
 	}
 
@@ -45,9 +45,9 @@
 
 	/*some checks*/
-	if   (nx != ny) _error_("Must have same number of x[%d] and y[%d] coordinates.",nx,ny);
+	if   (nx != ny){_error2_("Must have same number of x[" << nx << "] and y[" << ny << "] coordinates.");}
 	else            ncoord=nx;
-	if (sgn != +1 && sgn != -1) _error_("Hemisphere sgn=%d must be +1 (north) or -1 (south).",sgn);
-	if (fabs(cm)      > 180.) _error_("Central meridian cm=%g must be between -180 (west) and +180 (east) degrees.",cm);
-	if (sp < 0. || sp >  90.) _error_("Standard parallel sp=%g must be between 0 and 90 degrees (in specified hemisphere).",sp);
+	if (sgn != +1 && sgn != -1) _error2_("Hemisphere sgn=" << sgn << " must be +1 (north) or -1 (south).");
+	if (fabs(cm)      > 180.) _error2_("Central meridian cm=" << cm << " must be between -180 (west) and +180 (east) degrees.");
+	if (sp < 0. || sp >  90.) _error2_("Standard parallel sp=" << sp << " must be between 0 and 90 degrees (in specified hemisphere).");
 
 	lat=(double*)mxMalloc(ncoord*sizeof(double));
Index: /issm/trunk-jpl/src/modules/matlab/Makefile.am
===================================================================
--- /issm/trunk-jpl/src/modules/matlab/Makefile.am	(revision 12496)
+++ /issm/trunk-jpl/src/modules/matlab/Makefile.am	(revision 12497)
@@ -50,6 +50,9 @@
 AM_CXXFLAGS +=  -D_HAVE_MATLAB_MODULES_ -D_GNU_SOURCE -fPIC -fno-omit-frame-pointer -pthread 
 LDADD       += $(MEXLIB) ../../c/libISSMMatlab.a 
-
-LDADD       += ../../c/libISSMCore.a ../../c/libISSMModules.a 
+LDADD       += ../../c/libISSMCore.a 
+if CIRCULAR_DEPENDENCIES
+LDADD       += $(TRIANGLELIB) $(PETSCLIB) $(FLIBS) $(PLAPACKLIB) $(MUMPSLIB) $(SCALAPACKLIB) $(BLACSLIB) $(HYPRELIB) $(MLLIB) $(DAKOTALIB) $(METISLIB) $(CHACOLIB) $(SCOTCHLIB) $(BLASLAPACKLIB) $(MPILIB) $(MATHLIB) $(FORTRANLIB) $(GRAPHICSLIB) $(MULTITHREADINGLIB) $(SHAPELIBLIB) $(GSLLIB)
+endif
+LDADD       += ../../c/libISSMModules.a
 
 #Optimization flags:
