diff options
author | 2023-05-01 18:25:01 +0200 | |
---|---|---|
committer | 2023-05-01 09:25:01 -0700 | |
commit | 1c6f1bf24513b4e56f640eea402fa8223ea1c667 (patch) | |
tree | 29967ef551e4632b757f41ac98e10b258692be71 /Source/Initialization/PlasmaInjector.cpp | |
parent | a602c6e60ec8d6b728dfe7fe5e79ec191c906f57 (diff) | |
download | WarpX-1c6f1bf24513b4e56f640eea402fa8223ea1c667.tar.gz WarpX-1c6f1bf24513b4e56f640eea402fa8223ea1c667.tar.zst WarpX-1c6f1bf24513b4e56f640eea402fa8223ea1c667.zip |
Use WARPX_ABORT_WITH_MESSAGE("msg") instead of amrex::Abort(Utils::TextMsg::Err("msg")) (#3879)
* use WARPX_ABORT_WITH_MSG instead of amrex::Abort(Utils::TextMsg::Err(msg)) [WIP]
* use WARPX_ABORT_WITH_MESSAGE
* fix typo
* fix missing parenthesis
* remove spaces to prevent automatic text wrapping
* remove wrong parenthesis
Diffstat (limited to 'Source/Initialization/PlasmaInjector.cpp')
-rw-r--r-- | Source/Initialization/PlasmaInjector.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/Initialization/PlasmaInjector.cpp b/Source/Initialization/PlasmaInjector.cpp index 439e7a8d6..0282636c7 100644 --- a/Source/Initialization/PlasmaInjector.cpp +++ b/Source/Initialization/PlasmaInjector.cpp @@ -50,7 +50,7 @@ namespace { std::string string; stringstream << var << " string '" << name << "' not recognized."; string = stringstream.str(); - amrex::Abort(Utils::TextMsg::Err(string.c_str())); + WARPX_ABORT_WITH_MESSAGE(string.c_str()); } } @@ -388,9 +388,9 @@ PlasmaInjector::PlasmaInjector (int ispecies, const std::string& name) parseMomentum(pp_species_name); } else if (injection_style == "external_file") { #ifndef WARPX_USE_OPENPMD - amrex::Abort(Utils::TextMsg::Err( + WARPX_ABORT_WITH_MESSAGE( "WarpX has to be compiled with USE_OPENPMD=TRUE to be able" - " to read the external openPMD file with species data")); + " to read the external openPMD file with species data"); #endif external_file = true; std::string str_injection_file; @@ -475,9 +475,9 @@ PlasmaInjector::PlasmaInjector (int ispecies, const std::string& name) amrex::ParallelDescriptor::Bcast(&mass, 1, amrex::ParallelDescriptor::IOProcessorNumber()); #else - amrex::Abort(Utils::TextMsg::Err( + WARPX_ABORT_WITH_MESSAGE( "Plasma injection via external_file requires openPMD support: " - "Add USE_OPENPMD=TRUE when compiling WarpX.")); + "Add USE_OPENPMD=TRUE when compiling WarpX."); #endif // WARPX_USE_OPENPMD } else { |