25 inline Exception(
int ec) : pmpi_exception(ec) { }
27 int Get_error_code()
const;
29 int Get_error_class()
const;
31 const char* Get_error_string()
const;
35 inline Exception(
int ec) : error_code(ec), error_string(0), error_class(-1) {
36 (void)MPI_Error_class(error_code, &error_class);
38 error_string =
new char[MAX_ERROR_STRING];
39 (void)MPI_Error_string(error_code, error_string, &resultlen);
42 delete[] error_string;
48 : error_code(a.error_code), error_class(a.error_class)
50 error_string =
new char[MAX_ERROR_STRING];
54 for (
int i = 0; i < MAX_ERROR_STRING; i++)
55 error_string[i] = a.error_string[i];
58 inline int Get_error_code()
const {
return error_code; }
60 inline int Get_error_class()
const {
return error_class; }
62 inline const char* Get_error_string()
const {
return error_string; }
68 PMPI::Exception pmpi_exception;
Definition: exception.h:20