MPI_File_set_errhandler

int MPI_File_set_errhandler(MPI_File, MPI_Errhandler);
Associates a new error handler with a file.