specfem::program::abort¶
-
void specfem::program::abort(const std::string &message = "", int error_code = 30, const int line = -1, const char *file = "")¶
Terminate program with proper MPI cleanup.
Calls MPI_Abort if MPI is active, otherwise std::exit. Logs error using Logger if context exists, otherwise prints to std::cerr.
- Parameters:
message – Error message to display
error_code – Exit code (default: 30)
line – Source line number (default: -1)
file – Source file name (default: “”)