Ocean
Ocean::OceanException Class Reference

Definition of a base exception for the entire Ocean framework. More...

Inheritance diagram for Ocean::OceanException:

Public Member Functions

 OceanException ()=default
 Creates a new OceanException object without any message. More...
 
 OceanException (OceanException &&exception) noexcept
 Move constructor. More...
 
 OceanException (const OceanException &exception) noexcept
 Copy constructor. More...
 
 OceanException (const char *message)
 Creates a new OceanException object with a message. More...
 
 OceanException (const std::string &message)
 Creates a new OceanException object with a message. More...
 
 ~OceanException () override
 Destructs an exception object. More...
 
const char * what () const noexcept override
 Returns the exception message. More...
 
OceanExceptionoperator= (OceanException &&exception) noexcept
 Move operator. More...
 
OceanExceptionoperator= (const OceanException &exception) noexcept
 Copy operator. More...
 

Private Member Functions

void setMessage (const char *message)
 Sets a message. More...
 
void release ()
 Releases the exception and all resources. More...
 

Private Attributes

char * message_ = nullptr
 Exception message. More...
 

Detailed Description

Definition of a base exception for the entire Ocean framework.

Constructor & Destructor Documentation

◆ OceanException() [1/5]

Ocean::OceanException::OceanException ( )
default

Creates a new OceanException object without any message.

◆ OceanException() [2/5]

Ocean::OceanException::OceanException ( OceanException &&  exception)
noexcept

Move constructor.

Parameters
exceptionThe exception to be moved

◆ OceanException() [3/5]

Ocean::OceanException::OceanException ( const OceanException exception)
noexcept

Copy constructor.

Parameters
exceptionThe exception to be copied

◆ OceanException() [4/5]

Ocean::OceanException::OceanException ( const char *  message)
explicit

Creates a new OceanException object with a message.

Parameters
messageException message

◆ OceanException() [5/5]

Ocean::OceanException::OceanException ( const std::string &  message)
explicit

Creates a new OceanException object with a message.

Parameters
messageException message

◆ ~OceanException()

Ocean::OceanException::~OceanException ( )
override

Destructs an exception object.

Member Function Documentation

◆ operator=() [1/2]

OceanException& Ocean::OceanException::operator= ( const OceanException exception)
noexcept

Copy operator.

Parameters
exceptionThe exception to be moved
Returns
Reference to this object

◆ operator=() [2/2]

OceanException& Ocean::OceanException::operator= ( OceanException &&  exception)
noexcept

Move operator.

Parameters
exceptionThe exception to be moved
Returns
Reference to this object

◆ release()

void Ocean::OceanException::release ( )
private

Releases the exception and all resources.

◆ setMessage()

void Ocean::OceanException::setMessage ( const char *  message)
private

Sets a message.

Parameters
messageThe message to set, must be valid

◆ what()

const char* Ocean::OceanException::what ( ) const
overridenoexcept

Returns the exception message.

Returns
Exception message

Field Documentation

◆ message_

char* Ocean::OceanException::message_ = nullptr
private

Exception message.


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