DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
Issues.hpp
Go to the documentation of this file.
1
8#ifndef CMDLIB_INCLUDE_CMDLIB_ISSUES_HPP_
9#define CMDLIB_INCLUDE_CMDLIB_ISSUES_HPP_
10
11#include "ers/Issue.hpp"
12#include "logging/Logging.hpp" // NOTE: if ISSUES ARE DECLARED BEFORE include logging/Logging.hpp, TLOG_DEBUG<<issue wont work.
13#include <string>
14
15namespace dunedaq {
16
20
22 MalformedUri,
23 "Malformed uri: " << error << " uri:" << uri,
24 ((std::string)error)((std::string)uri))
25
26// Throw if a URI is given which is not supported by the code.
27// Provide the erroneous URI as arg.
28ERS_DECLARE_ISSUE(cmdlib, UnsupportedUri, "Unsupported URI: " << uri, ((std::string)uri))
29
30// Throw if a file can not be opened. Provide "mode" of "reading"
31// or "writing" and provide erroneous filename as args.
32// ERS_DECLARE_ISSUE(cmdlib, BadFile,
33// "Can not open file for " << mode << ": " << filename,
34// ((std::string)filename)
35// ((std::string)mode))
36
37// Throw if a stream of data is exhausted. Use in methods that
38// are given semantics that imply the stream is not expected to
39// become exhausted. Ie, GetNext() may throw but something like
40// GetNext(return_if_exhausted) -> value must not. Name the
41// stream and describe the error in the args.
42// ERS_DECLARE_ISSUE(cmdlib, StreamExhausted,
43// "Stream exhausted: " << stream_name << " err: " << err,
44// ((std::string)stream_name)
45// ((std::string)err))
46
47// Throw if a stream of data being consumed has values which are
48// not expected. Give the stream name and error message as args.
49// ERS_DECLARE_ISSUE(cmdlib, StreamCorrupt,
50// "Stream corrupt: " << stream_name << " err: " << err,
51// ((std::string)stream_name)
52// ((std::string)err))
53
54// Throw if an operation is the result of logically inconsistent
55// code. Describe the error in the "what" arg.
56// ERS_DECLARE_ISSUE(cmdlib, InternalError,
57// "Internal error: " << what,
58// ((std::string)what))
59
60ERS_DECLARE_ISSUE(cmdlib, CannotParseCommand, "Failed to parse command: " << error, ((std::string)error))
61
62ERS_DECLARE_ISSUE(cmdlib, CommandExecutionFailed, "Execution of command failed: " << error, ((std::string)error))
63
65 CommandFacilityInitialization,
66 "Problem configuring the command facility: " << error,
67 ((std::string)error))
68
71 "Failed to create CommandFacility uri:" << uri,
72 ((std::string)uri))
73
75 CompletionQueueIssue,
76 "Problem with command completion queue: " << error,
77 ((std::string)error))
78
81 "The main run loop for command reception was interrupted: " << error,
82 ((std::string)error))
83
84} // namespace dunedaq
85
86#endif // CMDLIB_INCLUDE_CMDLIB_ISSUES_HPP_
The DUNE-DAQ namespace.
UnsupportedUri
Definition Issues.hpp:28
ERS_DECLARE_ISSUE(cibmodules, CIBCommunicationError, " CIB Hardware Communication Error: "<< descriptor,((std::string) descriptor)) ERS_DECLARE_ISSUE(cibmodules
Unsupported std::string uri Execution of command std::string error Failed to create CommandFacility uri
Definition Issues.hpp:71
Unsupported std::string uri Execution of command std::string error Failed to create CommandFacility std::string uri RunLoopTerminated
Definition Issues.hpp:80
Unsupported std::string uri Execution of command std::string error CommandFacilityCreationFailed
Definition Issues.hpp:70
Unsupported std::string uri CommandExecutionFailed
Definition Issues.hpp:62
CIB Buffer std::string descriptor Message from std::string descriptor CIB process error