DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
dunedaq::oks::exception Class Reference

#include <exceptions.hpp>

Inheritance diagram for dunedaq::oks::exception:
[legend]
Collaboration diagram for dunedaq::oks::exception:
[legend]

Public Member Functions

 exception (const std::string &what_arg, int level_arg) noexcept
 
virtual ~exception () noexcept
 
int level () const noexcept
 
virtual const char * what () const noexcept
 

Private Attributes

std::string p_what
 
int p_level
 

Detailed Description

Generic OKS exception.

Definition at line 13 of file exceptions.hpp.

Constructor & Destructor Documentation

◆ exception()

dunedaq::oks::exception::exception ( const std::string & what_arg,
int level_arg )
noexcept

Definition at line 37 of file xml.cpp.

37 : p_level (level_arg)
38 {
39 std::ostringstream s;
40 s << "oks[" << p_level << "] ***: " << what_arg << std::ends;
41 p_what = s.str();
42 }

◆ ~exception()

virtual dunedaq::oks::exception::~exception ( )
inlinevirtualnoexcept

Definition at line 25 of file exceptions.hpp.

25{ }

Member Function Documentation

◆ level()

int dunedaq::oks::exception::level ( ) const
inlinenoexcept

The level indicates position of nested oks exception.

Definition at line 30 of file exceptions.hpp.

30{ return p_level; }

◆ what()

virtual const char * dunedaq::oks::exception::what ( ) const
inlinevirtualnoexcept

Return reason in a string representation.

Definition at line 35 of file exceptions.hpp.

35{ return p_what.c_str(); }

Member Data Documentation

◆ p_level

int dunedaq::oks::exception::p_level
private

Definition at line 18 of file exceptions.hpp.

◆ p_what

std::string dunedaq::oks::exception::p_what
private

Definition at line 17 of file exceptions.hpp.


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