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

General exception. More...

#include <Exception.hh>

Inheritance diagram for Exception:

Public Member Functions

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

Private Attributes

const std::string buffer
 

Friends

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

Detailed Description

General exception.

Definition at line 14 of file Exception.hh.

Constructor & Destructor Documentation

◆ Exception()

Exception::Exception ( const std::string & error)
inline

Constructor.

Parameters
errorerror message

Definition at line 21 of file Exception.hh.

21 :
22 std::exception(),
23 buffer(error)
24 {}
const std::string buffer
Definition Exception.hh:57

◆ ~Exception()

Exception::~Exception ( )
throw ( )
inline

Destructor.

Definition at line 30 of file Exception.hh.

31 {}

Member Function Documentation

◆ what()

virtual const char * Exception::what ( ) const
throw ( )
inlinevirtual

Get error message.

Returns
error message

Definition at line 39 of file Exception.hh.

40 {
41 return buffer.c_str();
42 }

Friends And Related Symbol Documentation

◆ operator<<

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

Print error message of JException.

Parameters
outoutput stream
exceptionexception

Definition at line 51 of file Exception.hh.

52 {
53 return out << exception.what();
54 }
virtual const char * what() const
Get error message.
Definition Exception.hh:39

Member Data Documentation

◆ buffer

const std::string Exception::buffer
private

Definition at line 57 of file Exception.hh.


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