crawlserv++  [under development]
Application for crawling and analyzing textual content of websites.
crawlservpp::Main::Exception Class Reference

Base class for all exceptions thrown by the application. More...

#include <Exception.hpp>

Inheritance diagram for crawlservpp::Main::Exception:
Collaboration diagram for crawlservpp::Main::Exception:

Construction and Destruction

 Exception (const std::string &description)
 Constructor for creating a new exception. More...
 
 ~Exception () override=default
 Default destructor. More...
 

Getter

std::string_view view () const noexcept
 Gets the description of the exception as a view to the underlying string. More...
 

Copy and Move

The class is both copyable and moveable.

 Exception (const Exception &other)=default
 Default copy constructor. More...
 
Exceptionoperator= (const Exception &other)=default
 Default copy assignment operator. More...
 
 Exception (Exception &&other)=default
 Default move constructor. More...
 
Exceptionoperator= (Exception &&other)=default
 Default move assignment operator. More...
 

Detailed Description

Base class for all exceptions thrown by the application.

Possesses a view into the string describing the exception.

Use MAIN_EXCEPTION_CLASS() for adding child classes of Main::Exception for general exceptions to another class.

Use MAIN_EXCEPTION_SUBCLASS(NAME) for adding children for specific types of exceptions to such a class.

Constructor & Destructor Documentation

◆ Exception() [1/3]

crawlservpp::Main::Exception::Exception ( const std::string &  description)
inlineexplicit

Constructor for creating a new exception.

The string will be handled by the std::runtime_error parent class.

An extra view into the string will be stored inside the class.

Note
An appropriate child class should be used when throwing an exception.
Use MAIN_EXCEPTION_CLASS() for adding child classes of Main::Exception to another class.
Use MAIN_EXCEPTION_SUBCLASS(NAME) for adding children to those classes for specific types of exceptions.
Parameters
descriptionA const reference to the string describing the exception.

◆ ~Exception()

crawlservpp::Main::Exception::~Exception ( )
overridedefault

Default destructor.

◆ Exception() [2/3]

crawlservpp::Main::Exception::Exception ( const Exception other)
default

Default copy constructor.

◆ Exception() [3/3]

crawlservpp::Main::Exception::Exception ( Exception &&  other)
default

Default move constructor.

Member Function Documentation

◆ operator=() [1/2]

Exception& crawlservpp::Main::Exception::operator= ( const Exception other)
default

Default copy assignment operator.

◆ operator=() [2/2]

Exception& crawlservpp::Main::Exception::operator= ( Exception &&  other)
default

Default move assignment operator.

◆ view()


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