PhoenixSwarm
6.1.0
Persistent processing programs exchanging data over sockets
Toggle main menu visibility
Loading...
Searching...
No Matches
main.cpp
Go to the documentation of this file.
1
/***************************************
2
Auteur : Pierre Aubert
3
Mail : pierre.aubert@lapp.in2p3.fr
4
Licence : LGPL-3.0-only
5
****************************************/
6
7
#include "phoenix_assert.h"
8
#include "phoenix_check.h"
9
#include "
daemon_config_exception.h
"
10
12
void
testSwarmException
(){
13
Phoenix::SwarmException
ex(
"function"
,
"some error message"
,
"Component"
);
14
phoenix_assert(phoenix_check(
"SwarmException component"
, ex.
getComponent
(), PString(
"Component"
)));
15
phoenix_assert(phoenix_check(
"SwarmException function"
, ex.
getFunction
(), PString(
"function"
)));
16
phoenix_assert(phoenix_check(
"SwarmException message"
, ex.
getMessage
(), PString(
"some error message"
)));
17
18
Phoenix::ParserException
pex(
"function"
,
"message"
);
19
phoenix_assert(phoenix_check(
"ParserException component"
, pex.
getComponent
(), PString(
"Parser"
)));
20
phoenix_assert(phoenix_check(
"ParserException function"
, pex.
getFunction
(), PString(
"function"
)));
21
phoenix_assert(phoenix_check(
"ParserException message"
, pex.
getMessage
(), PString(
"message"
)));
22
23
Phoenix::ConfigException
mex(
"function"
,
"message"
);
24
phoenix_assert(phoenix_check(
"ConfigException component"
, mex.
getComponent
(), PString(
"Config"
)));
25
phoenix_assert(phoenix_check(
"ConfigException function"
, mex.
getFunction
(), PString(
"function"
)));
26
phoenix_assert(phoenix_check(
"ConfigException message"
, mex.
getMessage
(), PString(
"message"
)));
27
28
Phoenix::SocketStatusException
sockex(
"function"
,
"message"
);
29
phoenix_assert(phoenix_check(
"SocketStatusException component"
, sockex.
getComponent
(), PString(
"SocketStatus"
)));
30
phoenix_assert(phoenix_check(
"SocketStatusException function"
, sockex.
getFunction
(), PString(
"function"
)));
31
phoenix_assert(phoenix_check(
"SocketStatusException message"
, sockex.
getMessage
(), PString(
"message"
)));
32
}
33
34
int
main
(
int
argc,
char
** argv){
35
testSwarmException
();
36
37
return
0;
38
}
main
int main(int argc, char **argv)
Definition
main.cpp:21
testSwarmException
void testSwarmException()
Test the Swarm exception.
Definition
main.cpp:12
Phoenix::ConfigException
Exception for daemon configuration errors.
Definition
daemon_config_exception.h:38
Phoenix::ParserException
Exception for configuration errors.
Definition
daemon_config_exception.h:32
Phoenix::SocketStatusException
Exception for socket status errors.
Definition
daemon_config_exception.h:44
Phoenix::SwarmException
Base exception class for the Phoenix project.
Definition
daemon_config_exception.h:15
Phoenix::SwarmException::getComponent
const PString & getComponent() const
Get the component of the SwarmException.
Definition
daemon_config_exception.cpp:24
Phoenix::SwarmException::getMessage
const PString & getMessage() const
Get the error message of the SwarmException.
Definition
daemon_config_exception.cpp:31
Phoenix::SwarmException::getFunction
const PString & getFunction() const
Get the function of the SwarmException.
Definition
daemon_config_exception.cpp:38
daemon_config_exception.h
platex
TESTS
TEST_SWARM_EXCEPTION
main.cpp
Generated by
1.18.0