STORMM Source Documentation
Loading...
Searching...
No Matches
error_format.h
1// -*-c++-*-
2#ifndef ERROR_FORMAT_H
3#define ERROR_FORMAT_H
4
5#include <string>
6#include "copyright.h"
7
8namespace stormm {
9namespace errors {
10
13enum class RTMessageKind {
14 ERROR,
15 TABULAR
16};
17
28std::string terminalFormat(const std::string &message, const char* class_caller = nullptr,
29 const char* method_caller = nullptr, int implicit_indent = 0,
30 int first_indent = 0, int subsq_indent = 0, int width_in = 0,
31 RTMessageKind style = RTMessageKind::ERROR);
32
41void rtErr(const std::string &message, const char* class_caller = nullptr,
42 const char* method_caller = nullptr);
43
51void rtWarn(const std::string &message, const char* class_caller = nullptr,
52 const char* method_caller = nullptr);
53
59void rtAlert(const std::string &message, const char* class_caller = nullptr,
60 const char* method_caller = nullptr);
61
66std::string listSeparator(int current_item, int item_count);
67
68} // namespace errors
69} // namespace stormm
70
71namespace stormm {
72 using errors::rtErr;
73 using errors::rtWarn;
74 using errors::rtAlert;
75} // namespace stormm
76
77#endif