DUNE-DAQ
DUNE Trigger and Data Acquisition software
Toggle main menu visibility
Loading...
Searching...
No Matches
dunedaq
sourcecode
oks
include
oks
exceptions.hpp
Go to the documentation of this file.
1
// DUNE DAQ modification notice:
2
// This file has been modified from the original ATLAS oks source for the DUNE DAQ project.
3
// Fork baseline commit: oks-08-03-04 (2022-04-14).
4
// Renamed since fork: yes (from oks/exceptions.h to include/oks/exceptions.hpp).
5
6
#ifndef OKS_EXCEPTIONS_H
7
#define OKS_EXCEPTIONS_H
8
9
#include <exception>
10
#include <string>
11
#include <iostream>
12
13
namespace
dunedaq
{
14
namespace
oks
{
15
17
18
class
exception
:
public
std::exception {
19
20
private
:
21
22
std::string
p_what
;
23
int
p_level
;
24
25
26
public
:
27
28
exception
(
const
std::string& what_arg,
int
level_arg)
noexcept
;
29
30
virtual
~exception
() noexcept { }
31
32
34
35
int
level
() const noexcept {
return
p_level
; }
36
37
39
40
virtual
const
char
*
what
() const noexcept {
return
p_what
.c_str(); }
41
42
};
43
44
inline
std::ostream &
operator<<
( std::ostream & s,
const
oks::exception
& ex) { s << ex.
what
();
return
s; }
45
46
void
throw_validate_not_empty
(
const
char
* name);
47
48
50
51
inline
void
validate_not_empty
(
const
std::string& value,
const
char
* name) {
52
if
(value.empty())
throw_validate_not_empty
(name);
53
}
54
}
//namespace oks
55
}
//namespace dunedaq
56
57
#endif
dunedaq::oks::exception
Definition
exceptions.hpp:18
dunedaq::oks::exception::~exception
virtual ~exception() noexcept
Definition
exceptions.hpp:30
dunedaq::oks::exception::p_level
int p_level
Definition
exceptions.hpp:23
dunedaq::oks::exception::what
virtual const char * what() const noexcept
Definition
exceptions.hpp:40
dunedaq::oks::exception::level
int level() const noexcept
Definition
exceptions.hpp:35
dunedaq::oks::exception::p_what
std::string p_what
Definition
exceptions.hpp:22
dunedaq::oks::exception::exception
exception(const std::string &what_arg, int level_arg) noexcept
Definition
xml.cpp:42
exception
caught dunedaq::conffwk::Exception exception
Definition
config_dump.cxx:31
dunedaq::oks
Definition
OksConfiguration.hpp:24
dunedaq::oks::validate_not_empty
void validate_not_empty(const std::string &value, const char *name)
Definition
exceptions.hpp:51
dunedaq::oks::operator<<
std::ostream & operator<<(std::ostream &s, const oks::exception &ex)
Definition
exceptions.hpp:44
dunedaq::oks::throw_validate_not_empty
void throw_validate_not_empty(const char *name)
Definition
xml.cpp:49
dunedaq
Including Qt Headers.
Definition
module.cpp:16
Generated on
for DUNE-DAQ by
1.17.0