crawlserv++  [under development]
Application for crawling and analyzing textual content of websites.
Exception.hpp File Reference
#include <stdexcept>
#include <string>
#include <string_view>
Include dependency graph for Exception.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  crawlservpp::Main::Exception
 Base class for all exceptions thrown by the application. More...
 

Namespaces

 crawlservpp::Main
 Namespace for the main classes of the program.
 

Macros

#define MAIN_EXCEPTION_CLASS()
 Macro used to easily define classes for general exceptions. More...
 
#define MAIN_EXCEPTION_SUBCLASS(NAME)
 Macro used to easily define classes for specific exceptions. More...
 

Macro Definition Documentation

◆ MAIN_EXCEPTION_CLASS

#define MAIN_EXCEPTION_CLASS ( )
Value:
class Exception : public Main::Exception { \
public: \
explicit Exception( \
const std::string& description \
) : Main::Exception(description) {} \
}

Macro used to easily define classes for general exceptions.

This macro will create a fully functional child class of Main::Exception.

Warning
The macro needs to be used inside another class or inside another namespace than Main.

◆ MAIN_EXCEPTION_SUBCLASS

#define MAIN_EXCEPTION_SUBCLASS (   NAME)
Value:
class NAME : public Exception { \
public: \
explicit NAME( \
const std::string& description \
) : Exception(description) {} \
}

Macro used to easily define classes for specific exceptions.

This macro will create a fully functional child class of the exception class previously defined by MAIN_EXCEPTION_CLASS().

Warning
MAIN_EXCEPTION_CLASS() must have been used in the current context before using this macro.