Jpp 21.0.0-rc.1
the software that should make you happy
Loading...
Searching...
No Matches
JLANG::JException Class Reference

General exception. More...

#include <JException.hh>

Inheritance diagram for JLANG::JException:
JLANG::JCastException JLANG::JControlHostException JLANG::JDatabaseException JLANG::JDictionaryDuplicateEntry JLANG::JDictionaryEntryNotFound JLANG::JDivisionByZero JLANG::JEmptyCollection JLANG::JEndOfFile JLANG::JFileOpenException JLANG::JFileReadException JLANG::JFileRecoveryException JLANG::JForkException JLANG::JFunctionalException JLANG::JIOException JLANG::JIndexOutOfRange JLANG::JMallocException JLANG::JNewException JLANG::JNoValue JLANG::JNullPointerException JLANG::JNumericalPrecision JLANG::JParseError JLANG::JParserException JLANG::JPipeOpenException JLANG::JPointerException JLANG::JPropertiesException JLANG::JProtocolException JLANG::JRunTimeException JLANG::JSelectException JLANG::JSocketChannelException JLANG::JSocketException JLANG::JSystemException JLANG::JTypeInformationException JLANG::JValueOutOfRange JTOOLS::JFunctional< JArgument_t, JResult_t >::JExceptionHandler JTRIGGER::JTriggerException

Public Member Functions

 JException (const std::string &error)
 Constructor.
 
 ~JException () throw ()
 Destructor.
 
virtual const char * what () const override throw ()
 Get error message.
 

Static Public Member Functions

static std::string getDateAndTime ()
 Get date and time [UTC].
 

Private Attributes

const std::string buffer
 

Friends

std::ostream & operator<< (std::ostream &out, const JException &exception)
 Print error message of JException.
 

Detailed Description

General exception.

Definition at line 25 of file JException.hh.

Constructor & Destructor Documentation

◆ JException()

JLANG::JException::JException ( const std::string & error)
inline

Constructor.

Parameters
errorerror message

Definition at line 47 of file JException.hh.

47 :
48 std::exception(),
49 buffer(error)
50 {}
const std::string buffer
Definition JException.hh:83

◆ ~JException()

JLANG::JException::~JException ( )
throw ( )
inline

Destructor.

Definition at line 56 of file JException.hh.

57 {}

Member Function Documentation

◆ getDateAndTime()

static std::string JLANG::JException::getDateAndTime ( )
inlinestatic

Get date and time [UTC].

Returns
date and time [UTC]

Definition at line 32 of file JException.hh.

33 {
34 using namespace std;
35
36 time_t result = time(NULL);
37
38 return asctime(gmtime(&result));
39 }

◆ what()

virtual const char * JLANG::JException::what ( ) const
throw ( )
inlineoverridevirtual

Get error message.

Returns
error message

Definition at line 65 of file JException.hh.

66 {
67 return buffer.c_str();
68 }

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream & out,
const JException & exception )
friend

Print error message of JException.

Parameters
outoutput stream
exceptionexception

Definition at line 77 of file JException.hh.

78 {
79 return out << exception.what();
80 }

Member Data Documentation

◆ buffer

const std::string JLANG::JException::buffer
private

Definition at line 83 of file JException.hh.


The documentation for this class was generated from the following file: