General exception.
More...
#include <JException.hh>
General exception.
Definition at line 24 of file JException.hh.
◆ JException()
JLANG::JException::JException |
( |
const std::string & |
error | ) |
|
|
inline |
◆ ~JException()
JLANG::JException::~JException |
( |
| ) |
|
throw | ( | |
| ) | | |
|
inline |
◆ getDateAndTime()
static std::string JLANG::JException::getDateAndTime |
( |
| ) |
|
|
inlinestatic |
Get date and time [UTC].
- Returns
- date and time [UTC]
Definition at line 31 of file JException.hh.
35 time_t
result = time(NULL);
37 return asctime(gmtime(&
result));
◆ what()
virtual const char* JLANG::JException::what |
( |
| ) |
const |
throw | ( | |
| ) | | |
|
inlineoverridevirtual |
Get error message.
- Returns
- error message
Definition at line 64 of file JException.hh.
◆ getOstream()
static std::ostream& JLANG::JException::getOstream |
( |
| ) |
|
|
inlinestatic |
Get output stream for conversion of exception.
Note that the ostream is emptied before use.
- Returns
- ostream
Definition at line 89 of file JException.hh.
91 static std::ostringstream
buffer;
◆ operator<<
std::ostream& operator<< |
( |
std::ostream & |
out, |
|
|
const JException & |
exception |
|
) |
| |
|
friend |
Print error message of JException.
- Parameters
-
out | output stream |
exception | exception |
Definition at line 76 of file JException.hh.
78 return out << exception.
what();
virtual const char * what() const override
Get error message.
◆ buffer
const std::string JLANG::JException::buffer |
|
private |
The documentation for this class was generated from the following file: