GCC Code Coverage Report


Directory: ./
File: src/Daemon/daemon_config_exception.cpp
Date: 2026-01-15 15:35:36
Exec Total Coverage
Lines: 18 18 100.0%
Functions: 7 7 100.0%
Branches: 15 15 100.0%

Line Branch Exec Source
1 /***************************************
2 Auteur : Thibaut Oprinsen
3 Mail : thibaut.oprinsen@lapp.in2p3.fr
4 Licence : CeCILL-C
5 ****************************************/
6
7 #include "daemon_config_exception.h"
8
9
10 ///Constructor of the SwarmException
11 /** @param function : name of the function where the error occurs
12 * @param message : error message
13 * @param component : component where the error happened
14 */
15 30 Phoenix::SwarmException::SwarmException(const PString& function, const PString& message, const PString& component)
16
9/9
✓ Branch 0 (2→3) taken 30 times.
✓ Branch 2 (3→4) taken 30 times.
✓ Branch 4 (4→5) taken 30 times.
✓ Branch 6 (5→6) taken 30 times.
✓ Branch 8 (6→7) taken 30 times.
✓ Branch 10 (7→8) taken 30 times.
✓ Branch 12 (13→14) taken 30 times.
✓ Branch 14 (14→15) taken 30 times.
✓ Branch 16 (15→16) taken 30 times.
30 :std::runtime_error("[" + component + "] " + function + ": " + message), p_function(function), p_message(message), p_component(component)
17 {
18
19 30 }
20
21 ///Get the component of the SwarmException
22 /** @return component of the SwarmException
23 */
24 4 const PString & Phoenix::SwarmException::getComponent() const{
25 4 return p_component;
26 }
27
28 ///Get the error message of the SwarmException
29 /** @return component of the SwarmException
30 */
31 4 const PString & Phoenix::SwarmException::getMessage() const{
32 4 return p_message;
33 }
34
35 ///Get the function of the SwarmException
36 /** @return function of the SwarmException
37 */
38 4 const PString & Phoenix::SwarmException::getFunction() const{
39 4 return p_function;
40 }
41
42 ///Parser exception
43 /** @param function : function where the error occurs
44 * @param message : error message
45 */
46 10 Phoenix::ParserException::ParserException(const PString& function, const PString& message)
47
2/2
✓ Branch 0 (2→3) taken 10 times.
✓ Branch 2 (3→4) taken 10 times.
10 :SwarmException(function, message, "Parser")
48 10 {}
49
50 ///Config exception
51 /** @param function : function where the error occurs
52 * @param message : error message
53 */
54 17 Phoenix::ConfigException::ConfigException(const PString& function, const PString& message)
55
2/2
✓ Branch 0 (2→3) taken 17 times.
✓ Branch 2 (3→4) taken 17 times.
17 :SwarmException(function, message, "Config")
56 17 {}
57
58 ///Socket exception
59 /** @param function : function where the error occurs
60 * @param message : error message
61 */
62 2 Phoenix::SocketStatusException::SocketStatusException(const PString& function, const PString& message)
63
2/2
✓ Branch 0 (2→3) taken 2 times.
✓ Branch 2 (3→4) taken 2 times.
2 :SwarmException(function, message, "SocketStatus")
64 2 {}
65
66
67
68
69