ChessPlusPlus  WIP
cplusplus.com Community Project
chesspp::Exception Class Reference

The base exception class for all ChessPlusPlus exceptions. More...

#include <Exception.hpp>

Inheritance diagram for chesspp::Exception:

Public Member Functions

 Exception (std::string const &e_="") noexcept(noexcept(std::string(std::string(""))))
 Construct an exception with an optional message. More...
 
 Exception (Exception const &)=default
 
 Exception (Exception &&)=default
 
Exceptionoperator= (Exception const &)=default
 
Exceptionoperator= (Exception &&)=default
 
virtual ~Exception ()=default
 
virtual bool operator== (std::exception const &other) const noexcept
 Compares two exceptions by their memory address. More...
 
virtual const char * what () const noexceptoverride
 Returns the message of the exception. More...
 
virtual operator std::string () const noexcept
 Returns the message of the exception. More...
 

Friends

bool operator== (std::exception const &e1, Exception const &e2) noexcept
 Compares two exceptions by their memory address. More...
 

Detailed Description

The base exception class for all ChessPlusPlus exceptions.

Constructor & Destructor Documentation

chesspp::Exception::Exception ( std::string const &  e_ = "")
inlinenoexcept

Construct an exception with an optional message.

Parameters
e_optional message of exception.
chesspp::Exception::Exception ( Exception const &  )
default
chesspp::Exception::Exception ( Exception &&  )
default
virtual chesspp::Exception::~Exception ( )
virtualdefault

Member Function Documentation

virtual chesspp::Exception::operator std::string ( ) const
inlinevirtualnoexcept

Returns the message of the exception.

Returns
The message of the exception.
Exception& chesspp::Exception::operator= ( Exception const &  )
default
Exception& chesspp::Exception::operator= ( Exception &&  )
default
virtual bool chesspp::Exception::operator== ( std::exception const &  other) const
inlinevirtualnoexcept

Compares two exceptions by their memory address.

virtual const char* chesspp::Exception::what ( ) const
inlineoverridevirtualnoexcept

Returns the message of the exception.

Returns
The message of the exception.

Friends And Related Function Documentation

bool operator== ( std::exception const &  e1,
Exception const &  e2 
)
friend

Compares two exceptions by their memory address.


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