Index: /issm/trunk-jpl/src/c/shared/Exceptions/Exceptions.cpp
===================================================================
--- /issm/trunk-jpl/src/c/shared/Exceptions/Exceptions.cpp	(revision 16154)
+++ /issm/trunk-jpl/src/c/shared/Exceptions/Exceptions.cpp	(revision 16155)
@@ -9,13 +9,18 @@
 #endif
 
+#include <cstring>
 #include "./exceptions.h"
 #include "../io/Print/Print.h"
 #include "../io/Comm/IssmComm.h"
 
-ErrorException::ErrorException(const string &what_arg){/*{{{*/
+ErrorException::ErrorException(const string & what_arg){/*{{{*/
 
-	what_str      = what_arg;
-	file_name     = "";
-	function_name = "";
+	int len;
+	len           = strlen(what_arg.c_str())+1;
+	what_str      = new char[len];
+	memcpy(what_str,what_arg.c_str(),len);
+
+	file_name     = NULL;
+	function_name = NULL;
 	file_line     = 0;
 
@@ -23,37 +28,50 @@
 ErrorException::ErrorException(const string& what_file, const string& what_function,int what_line, const string& what_arg){/*{{{*/
 
-	what_str      = what_arg;
-	file_name     = what_file;
-	function_name = what_function;
-	file_line     = what_line;
+	int len;
+
+	len      = strlen(what_arg.c_str())+1;
+	what_str = new char[len];
+	memcpy(what_str,what_arg.c_str(),len);
+
+	len       = strlen(what_file.c_str())+1;
+	file_name = new char[len];
+	memcpy(file_name,what_file.c_str(),len);
+
+	len           = strlen(what_function.c_str())+1;
+	function_name = new char[len];
+	memcpy(function_name,what_function.c_str(),len);
+
+	file_line= what_line;
 
 }/*}}}*/
 ErrorException::~ErrorException() throw(){/*{{{*/
+	delete [] what_str;
+	delete [] file_name;
+	delete [] function_name;
 }/*}}}*/
 const char* ErrorException::what() const throw(){/*{{{*/
-	return what_str.c_str();
+	return what_str;
 }/*}}}*/
 void ErrorException::Report() const{/*{{{*/
 
-	int my_rank;
-	int num_procs;
+	/*WINDOWS*/
+	if(!function_name || file_line==0){
+		_printf_("Error message: " << what());
+		return;
+	}
 
 	/*recover my_rank and num_procs:*/
-	my_rank=IssmComm::GetRank();
-	num_procs=IssmComm::GetSize();
+	int my_rank   = IssmComm::GetRank();
+	int num_procs = IssmComm::GetSize();
 
-	if (function_name=="" || file_line==0){ //WINDOWS
-		_printf_("Error message: " << what());
+	if(num_procs==1){
+		_printf_("\n??? Error in ==> " << file_name << ":" << file_line << "\n");
+		_printf_(function_name << " error message: " << what() << "\n\n");
 	}
 	else{
-		if(num_procs==1){
-			_printf_("\n??? Error in ==> " << file_name.c_str() << ":" << file_line << "\n");
-			_printf_(function_name.c_str() << " error message: " << what() << "\n\n");
-		}
-		else{
-			_printf_("\n[" << my_rank<< "] ??? Error using ==> " << file_name.c_str() << ":" << file_line << "\n");
-			_printf_(  "[" << my_rank << "] " << function_name.c_str() << " error message: " << what() << "\n\n");
-		}
+		_printf_("\n[" << my_rank<< "] ??? Error using ==> " << file_name << ":" << file_line << "\n");
+		_printf_(  "[" << my_rank << "] " << function_name << " error message: " << what() << "\n\n");
 	}
+
 	return;
 }/*}}}*/
@@ -63,11 +81,13 @@
 	std::ostringstream buffer;
 
-	if (this->file_line==0){ //WINDOWS
-		 buffer << " error message: " << (this->what_str).c_str();
+	/*WINDOWS*/
+	if(!function_name || file_line==0){ 
+		buffer << " error message: " << this->what_str;
+		const string buffer2 = buffer.str();
+		return buffer2.c_str();
 	}
-	else{
-		buffer << "\nError in ==> " << (this->file_name).c_str() << ":" << file_line << "\n";
-		buffer << (this->function_name).c_str() << " error message: " << (this->what_str).c_str();
-	}
+
+	buffer << "\nError in ==> " << this->file_name << ":" << file_line << "\n";
+	buffer << this->function_name << " error message: " << this->what_str;
 
 	const string buffer2 = buffer.str();
@@ -79,11 +99,13 @@
 	std::ostringstream buffer;
 
-	if (this->file_line==0){ //WINDOWS
-		buffer << " error message: " << (this->what_str).c_str();
+	/*WINDOWS*/
+	if(!function_name || file_line==0){ 
+		buffer << " error message: " << this->what_str;
+		const string buffer2 = buffer.str();
+		return buffer2.c_str();
 	}
-	else{
-		buffer << "\nError in ==> " << (this->file_name).c_str() << ":" << file_line << "\n";
-		buffer << (this->function_name).c_str() << " error message: " << (this->what_str).c_str();
-	}
+
+	buffer << "\nError in ==> " << this->file_name << ":" << file_line << "\n";
+	buffer << this->function_name << " error message: " << this->what_str;
 
 	const string buffer2 = buffer.str();
Index: /issm/trunk-jpl/src/c/shared/Exceptions/exceptions.h
===================================================================
--- /issm/trunk-jpl/src/c/shared/Exceptions/exceptions.h	(revision 16154)
+++ /issm/trunk-jpl/src/c/shared/Exceptions/exceptions.h	(revision 16155)
@@ -76,8 +76,8 @@
 class ErrorException: public exception { /*{{{*/
 
-	string   what_str;
-	string   function_name;
-	string   file_name;
-	int      file_line;
+	char* what_str;
+	char* function_name;
+	char* file_name;
+	int   file_line;
 
 	public:
