#include "teca_config.h"
#include "teca_parallel_id.h"
#include <iostream>
#include <sstream>
#include <unistd.h>
#include <cstdio>
#include <string>
#include <vector>
Go to the source code of this file.
|
| #define | TECA_MESSAGE(_strm, _head, _head_color, _msg) |
| |
| #define | TECA_MESSAGE_RAW(_strm, _head, _msg) |
| | Send a message into the stream that include MPI ranks and thread id. More...
|
| |
| #define | TECA_FATAL_ERROR(_msg) |
| |
| #define | TECA_ERROR(_msg) TECA_MESSAGE(std::cerr, "ERROR:", ANSI_RED, _msg) |
| | Constructs an error message and sends it to the stderr stream. More...
|
| |
| #define | TECA_WARNING(_msg) TECA_MESSAGE(std::cerr, "WARNING:", ANSI_YELLOW, _msg) |
| | Constructs a warning message and sends it to the stderr stream. More...
|
| |
| #define | TECA_STATUS(_msg) TECA_MESSAGE(std::cerr, "STATUS:", ANSI_GREEN, _msg) |
| | Constructs a status message and sends it to the stderr stream. More...
|
| |
◆ TECA_ERROR
| #define TECA_ERROR |
( |
|
_msg | ) |
TECA_MESSAGE(std::cerr, "ERROR:", ANSI_RED, _msg) |
Constructs an error message and sends it to the stderr stream.
◆ TECA_FATAL_ERROR
| #define TECA_FATAL_ERROR |
( |
|
_msg | ) |
|
Value:{ \
std::ostringstream ess; \
TECA_MESSAGE(ess, "ERROR:", ANSI_RED, _msg) \
teca_error::error_handler(ess.str().c_str()); \
}
Constructs an the error message using TECA_MESSAGE and invokes the error handler.
◆ TECA_MESSAGE
| #define TECA_MESSAGE |
( |
|
_strm, |
|
|
|
_head, |
|
|
|
_head_color, |
|
|
|
_msg |
|
) |
| |
Value:_strm \
<< BEGIN_HL(_head_color) << _head << END_HL \
<< " " << TECA_VERSION_DESCR << "]" << std::endl \
<< BEGIN_HL(_head_color) << _head << END_HL << " " \
<< BEGIN_HL(ANSI_WHITE) << "" _msg << END_HL << std::endl;
Send a message into the stream with an ANSI color coded message that include MPI ranks and thread id.
◆ TECA_MESSAGE_RAW
| #define TECA_MESSAGE_RAW |
( |
|
_strm, |
|
|
|
_head, |
|
|
|
_msg |
|
) |
| |
Value:_strm \
<< ":" << __LINE__ << " " << TECA_VERSION_DESCR << "]" << std::endl \
<< _head << " " << "" _msg << std::endl;
Send a message into the stream that include MPI ranks and thread id.
◆ TECA_STATUS
| #define TECA_STATUS |
( |
|
_msg | ) |
TECA_MESSAGE(std::cerr, "STATUS:", ANSI_GREEN, _msg) |
Constructs a status message and sends it to the stderr stream.
◆ TECA_WARNING
| #define TECA_WARNING |
( |
|
_msg | ) |
TECA_MESSAGE(std::cerr, "WARNING:", ANSI_YELLOW, _msg) |
Constructs a warning message and sends it to the stderr stream.
◆ p_teca_error_handler
The call signature for the error handler. The error handler will be passed a string describing the error.