WarpX
Loading...
Searching...
No Matches
TextMsg.H File Reference
#include <string>

Go to the source code of this file.

Namespaces

namespace  ablastr
 
namespace  ablastr::utils
 
namespace  ablastr::utils::TextMsg
 

Macros

#define ABLASTR_ALWAYS_ASSERT_WITH_MESSAGE(EX, MSG)
 
#define ABLASTR_ABORT_WITH_MESSAGE(MSG)
 

Functions

std::string ablastr::utils::TextMsg::Err (const std::string &msg, bool do_text_wrapping=true)
 This function formats a text message as an error message, adding the '### ERROR: ' prefix and (by default) performing text wrapping.
 
std::string ablastr::utils::TextMsg::Info (const std::string &msg, bool do_text_wrapping=true)
 This function formats a text message as an info message, adding the '### INFO: ' prefix and (by default) performing text wrapping.
 
std::string ablastr::utils::TextMsg::Warn (const std::string &msg, bool do_text_wrapping=true)
 This function formats a text message as a warning message, adding the '### WARN: ' prefix and (by default) performing text wrapping. Warning: this format is not used by the WarningLogger, which has an internal, dedicated, formatter.
 
void ablastr::utils::TextMsg::Assert (const char *ex, const char *file, int line, const std::string &msg)
 This function is a wrapper around amrex::Assert, designed to ensure the uniform formatting of the error messages. The function is designed to be used via the ABLASTR_ALWAYS_ASSERT_WITH_MESSAGE(EX,MSG) macro.
 
void ablastr::utils::TextMsg::Abort (const char *file, int line, const std::string &msg)
 This function is a wrapper around amrex::Abort, designed to ensure the uniform formatting of the error messages. The function is designed to be used via the ABLASTR_ABORT_WITH_MESSAGE(MSG) macro.
 

Macro Definition Documentation

◆ ABLASTR_ABORT_WITH_MESSAGE

#define ABLASTR_ABORT_WITH_MESSAGE ( MSG)
Value:
ablastr::utils::TextMsg::Abort( __FILE__, __LINE__ , MSG)
void Abort(const char *file, int line, const std::string &msg)
This function is a wrapper around amrex::Abort, designed to ensure the uniform formatting of the erro...
Definition TextMsg.cpp:84

◆ ABLASTR_ALWAYS_ASSERT_WITH_MESSAGE

#define ABLASTR_ALWAYS_ASSERT_WITH_MESSAGE ( EX,
MSG )
Value:
(EX)?((void)0) : ablastr::utils::TextMsg::Assert( # EX , __FILE__, __LINE__ , MSG)
void Assert(const char *ex, const char *file, int line, const std::string &msg)
This function is a wrapper around amrex::Assert, designed to ensure the uniform formatting of the err...
Definition TextMsg.cpp:77