aboutsummaryrefslogtreecommitdiff
path: root/Source/Diagnostics/FlushFormats/FlushFormatCheckpoint.cpp
diff options
context:
space:
mode:
authorGravatar Luca Fedeli <luca.fedeli@cea.fr> 2022-05-17 09:58:22 +0200
committerGravatar GitHub <noreply@github.com> 2022-05-17 09:58:22 +0200
commit724a0e061274d4eac5daed409933fe073899eda7 (patch)
treea41e84351288e83242ae897fcbb44356d7dc6f9d /Source/Diagnostics/FlushFormats/FlushFormatCheckpoint.cpp
parent8581ed36ae2b9c4ad8fb983a3f299c9167611ab7 (diff)
downloadWarpX-724a0e061274d4eac5daed409933fe073899eda7.tar.gz
WarpX-724a0e061274d4eac5daed409933fe073899eda7.tar.zst
WarpX-724a0e061274d4eac5daed409933fe073899eda7.zip
Use uniform error message formatting in more source files (#2964)
* use WARPX_ALWAYS_ASSERT_WITH_MESSAGE instead of Abort() * fix bug * Update Source/WarpX.cpp Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * use more uniform text formatting * fixed bug * fixed bug * using Utils::TextMsg in more files * fixed bug * use Utils::TextMsg in more files * fixed bug * use Utils::TextMsg in more files * fixed last merge conflict * fixed bug * fix indentation Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
Diffstat (limited to 'Source/Diagnostics/FlushFormats/FlushFormatCheckpoint.cpp')
-rw-r--r--Source/Diagnostics/FlushFormats/FlushFormatCheckpoint.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/Diagnostics/FlushFormats/FlushFormatCheckpoint.cpp b/Source/Diagnostics/FlushFormats/FlushFormatCheckpoint.cpp
index 12f7ecb7b..c396818cd 100644
--- a/Source/Diagnostics/FlushFormats/FlushFormatCheckpoint.cpp
+++ b/Source/Diagnostics/FlushFormats/FlushFormatCheckpoint.cpp
@@ -224,9 +224,10 @@ FlushFormatCheckpoint::WriteDMaps (const std::string& dir, int nlev) const
DMFile.flush();
DMFile.close();
- if (!DMFile.good()) {
- amrex::Abort("FlushFormatCheckpoint::WriteDMaps: problem writing DMFile");
- }
+ WARPX_ALWAYS_ASSERT_WITH_MESSAGE(
+ DMFile.good(),
+ "FlushFormatCheckpoint::WriteDMaps: problem writing DMFile"
+ );
}
}
}