Public Member Functions | Friends | List of all members
sdf::v8::Exception Class Reference

Class for generating exceptions. More...

#include <common/common.hh>

Inheritance diagram for sdf::v8::Exception:
Inheritance graph
[legend]

Public Member Functions

 Exception ()
 Constructor. More...
 
 Exception (const char *_file, std::int64_t _line, std::string _msg)
 Default constructor. More...
 
 Exception (const Exception &_e)
 Copy constructor. More...
 
 Exception (Exception &&_e) noexcept
 Move constructor. More...
 
virtual ~Exception ()
 Destructor. More...
 
std::string GetErrorFile () const
 Return the error function. More...
 
std::string GetErrorStr () const
 Return the error string. More...
 
Exceptionoperator= (const Exception &_exception)
 Assignment operator. More...
 
Exceptionoperator= (Exception &&_exception)
 Move assignment operator. More...
 
void Print () const
 Print the exception to std out. More...
 

Friends

std::ostream & operator<< (std::ostream &_out, const sdf::Exception &_err)
 stream insertion operator for Gazebo Error More...
 

Detailed Description

Class for generating exceptions.

Constructor & Destructor Documentation

◆ Exception() [1/4]

sdf::v8::Exception::Exception ( )

Constructor.

◆ Exception() [2/4]

sdf::v8::Exception::Exception ( const char *  _file,
std::int64_t  _line,
std::string  _msg 
)

Default constructor.

Parameters
[in]_fileFile name
[in]_lineLine number where the error occurred
[in]_msgError message

◆ Exception() [3/4]

sdf::v8::Exception::Exception ( const Exception _e)

Copy constructor.

Parameters
[in]_eException to copy.

◆ Exception() [4/4]

sdf::v8::Exception::Exception ( Exception &&  _e)
noexcept

Move constructor.

Parameters
[in]_eException to move.

◆ ~Exception()

virtual sdf::v8::Exception::~Exception ( )
virtual

Destructor.

Member Function Documentation

◆ GetErrorFile()

std::string sdf::v8::Exception::GetErrorFile ( ) const

Return the error function.

Returns
The error function name

◆ GetErrorStr()

std::string sdf::v8::Exception::GetErrorStr ( ) const

Return the error string.

Returns
The error string

◆ operator=() [1/2]

Exception& sdf::v8::Exception::operator= ( const Exception _exception)

Assignment operator.

Parameters
[in]_exceptionThe exception to set values from.
Returns
*this

◆ operator=() [2/2]

Exception& sdf::v8::Exception::operator= ( Exception &&  _exception)

Move assignment operator.

Parameters
[in]_exceptionException to move.
Returns
Reference to this.

◆ Print()

void sdf::v8::Exception::Print ( ) const

Print the exception to std out.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  _out,
const sdf::Exception &  _err 
)
friend

stream insertion operator for Gazebo Error

Parameters
[in]_outthe output stream
[in]_errthe exception

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