PhoenixSwarm  3.5.0
Library to ease communication between daemons
Loading...
Searching...
No Matches
Phoenix::SwarmException Class Reference

Base exception class for the Phoenix project. More...

#include <daemon_config_exception.h>

+ Inheritance diagram for Phoenix::SwarmException:
+ Collaboration diagram for Phoenix::SwarmException:

Public Member Functions

const PString & getComponent () const
 Get the component of the SwarmException.
 
const PString & getFunction () const
 Get the function of the SwarmException.
 
const PString & getMessage () const
 Get the error message of the SwarmException.
 
 SwarmException (const PString &function, const PString &message, const PString &component="")
 Constructor of the SwarmException.
 

Private Attributes

PString p_component
 Component of the message.
 
PString p_function
 Function where the error occurs.
 
PString p_message
 Error Message.
 

Detailed Description

Base exception class for the Phoenix project.

Definition at line 15 of file daemon_config_exception.h.

Constructor & Destructor Documentation

◆ SwarmException()

Phoenix::SwarmException::SwarmException ( const PString & function,
const PString & message,
const PString & component = "" )

Constructor of the SwarmException.

Parameters
function: name of the function where the error occurs
message: error message
component: component where the error happened

Definition at line 15 of file daemon_config_exception.cpp.

16 :std::runtime_error("[" + component + "] " + function + ": " + message), p_function(function), p_message(message), p_component(component)
17{
18
19}
PString p_function
Function where the error occurs.
PString p_message
Error Message.
PString p_component
Component of the message.

References p_component, p_function, and p_message.

Referenced by Phoenix::ConfigException::ConfigException(), Phoenix::ParserException::ParserException(), and Phoenix::SocketStatusException::SocketStatusException().

+ Here is the caller graph for this function:

Member Function Documentation

◆ getComponent()

const PString & Phoenix::SwarmException::getComponent ( ) const

Get the component of the SwarmException.

Returns
component of the SwarmException

Definition at line 24 of file daemon_config_exception.cpp.

24 {
25 return p_component;
26}

References p_component.

◆ getFunction()

const PString & Phoenix::SwarmException::getFunction ( ) const

Get the function of the SwarmException.

Returns
function of the SwarmException

Definition at line 38 of file daemon_config_exception.cpp.

38 {
39 return p_function;
40}

References p_function.

◆ getMessage()

const PString & Phoenix::SwarmException::getMessage ( ) const

Get the error message of the SwarmException.

Returns
component of the SwarmException

Definition at line 31 of file daemon_config_exception.cpp.

31 {
32 return p_message;
33}

References p_message.

Member Data Documentation

◆ p_component

PString Phoenix::SwarmException::p_component
private

Component of the message.

Definition at line 28 of file daemon_config_exception.h.

Referenced by getComponent(), and SwarmException().

◆ p_function

PString Phoenix::SwarmException::p_function
private

Function where the error occurs.

Definition at line 24 of file daemon_config_exception.h.

Referenced by getFunction(), and SwarmException().

◆ p_message

PString Phoenix::SwarmException::p_message
private

Error Message.

Definition at line 26 of file daemon_config_exception.h.

Referenced by getMessage(), and SwarmException().


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