Jpp  18.0.1-rc.1
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | Private Attributes | Friends | List of all members
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::JIndexOutOfRange JLANG::JIOException 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 JTRIGGER::JTriggerException

Public Member Functions

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

Static Public Member Functions

static std::ostream & getOstream ()
 Get output stream for conversion of exception. More...
 

Private Attributes

const std::string buffer
 

Friends

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

Detailed Description

General exception.

Definition at line 23 of file JException.hh.

Constructor & Destructor Documentation

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

Constructor.

Parameters
errorerror message

Definition at line 30 of file JException.hh.

30  :
31  std::exception(),
32  buffer(error)
33  {}
const std::string buffer
Definition: JException.hh:83
JLANG::JException::~JException ( )
throw (
)
inline

Destructor.

Definition at line 39 of file JException.hh.

40  {}

Member Function Documentation

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

Get error message.

Returns
error message

Definition at line 48 of file JException.hh.

49  {
50  return buffer.c_str();
51  }
const std::string buffer
Definition: JException.hh:83
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 73 of file JException.hh.

74  {
75  static std::ostringstream buffer;
76 
77  buffer.str("");
78 
79  return buffer;
80  }
const std::string buffer
Definition: JException.hh:83

Friends And Related Function Documentation

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

Print error message of JException.

Parameters
outoutput stream
exceptionexception

Definition at line 60 of file JException.hh.

61  {
62  return out << exception.what();
63  }
virtual const char * what() const override
Get error message.
Definition: JException.hh:48

Member Data Documentation

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: