fix error handling

This commit is contained in:
Vítor Santos Costa
2015-09-25 10:57:26 +01:00
parent 4336b2ba88
commit b871f6676e
145 changed files with 4466 additions and 7508 deletions

View File

@@ -85,7 +85,7 @@ expand_buffer( int space )
tmp = malloc( bufsize + space );
if( tmp == NULL ) {
Yap_Error(SYSTEM_ERROR, TermNil, "out of memory" );
Yap_Error(SYSTEM_ERROR_INTERNAL, TermNil, "out of memory" );
Yap_exit( EXIT_FAILURE );
}
memcpy( tmp, buf, bufsize );
@@ -94,7 +94,7 @@ expand_buffer( int space )
#else /* use realloc */
buf = realloc( buf, bufsize + space );
if( buf == NULL ) {
Yap_Error(SYSTEM_ERROR, TermNil, "out of memory");
Yap_Error(SYSTEM_ERROR_INTERNAL, TermNil, "out of memory");
Yap_exit( EXIT_FAILURE );
}
#endif
@@ -147,7 +147,7 @@ Yap exit(FAILURE), whereas in Yap/LAM mpi_open/3 simply fails.
Term t;
t = MkIntegerTerm(retv);
Yap_Error( SYSTEM_ERROR, t, "MPI_Init() returned non-zero" );
Yap_Error( SYSTEM_ERROR_INTERNAL, t, "MPI_Init() returned non-zero" );
return FALSE;
}
MPI_Comm_size( MPI_COMM_WORLD, &numprocs );