try to catch format errors from fmtlib

This commit is contained in:
Axel Kohlmeyer
2021-02-26 14:08:38 -05:00
parent bb13ce4349
commit 3042e28297
2 changed files with 16 additions and 4 deletions

View File

@ -58,6 +58,10 @@ int main(int argc, char **argv)
MPI_Barrier(MPI_COMM_WORLD);
MPI_Finalize();
exit(1);
} catch(fmt::format_error &fe) {
fprintf(stderr,"fmt::format_error: %s\n", fe.what());
MPI_Abort(MPI_COMM_WORLD, 1);
exit(1);
}
#else
LAMMPS *lammps = new LAMMPS(argc,argv,MPI_COMM_WORLD);