Jpp 19.3.0-rc.3
the software that should make you happy
Loading...
Searching...
No Matches
JLANG::JPointerException Class Reference

Exception for accessing an invalid pointer. More...

#include <JException.hh>

Inheritance diagram for JLANG::JPointerException:
JLANG::JException

Public Member Functions

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

Static Public Member Functions

static std::string getDateAndTime ()
 Get date and time [UTC].
 
static std::ostream & getOstream ()
 Get output stream for conversion of exception.
 

Private Attributes

const std::string buffer
 

Detailed Description

Exception for accessing an invalid pointer.

Definition at line 124 of file JException.hh.

Constructor & Destructor Documentation

◆ JPointerException()

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

Constructor.

Parameters
errorerror message

Definition at line 133 of file JException.hh.

133 :
134 JException(error)
135 {}
JException(const std::string &error)
Constructor.
Definition JException.hh:46

Member Function Documentation

◆ getDateAndTime()

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

Get date and time [UTC].

Returns
date and time [UTC]

Definition at line 31 of file JException.hh.

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

◆ what()

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

Get error message.

Returns
error message

Definition at line 64 of file JException.hh.

65 {
66 return buffer.c_str();
67 }
const std::string buffer
Definition JException.hh:99

◆ getOstream()

static std::ostream & JLANG::JException::getOstream ( )
inlinestaticinherited

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.

90 {
91 static std::ostringstream buffer;
92
93 buffer.str("");
94
95 return buffer;
96 }

Member Data Documentation

◆ buffer

const std::string JLANG::JException::buffer
privateinherited

Definition at line 99 of file JException.hh.


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