BOSS 7.1.0
BESIII Offline Software System
Loading...
Searching...
No Matches
UnboundSourceIdentifierIssue.h
Go to the documentation of this file.
1//Dear emacs, this is -*- c++ -*-
2
3/**
4 * @file eformat/UnboundSourceIdentifierIssue.h
5 * @author <a href="mailto:[email protected]">Andre DOS ANJOS</a>
6 * $Author: zhangy $
7 * $Revision: 1.1.1.1 $
8 * $Date: 2009/06/19 07:35:41 $
9 *
10 * @brief Exception thrown when I cannot map an old SourceIdentifier (v2.4)
11 * into a new one
12 */
13
14#ifndef EFORMAT_UNBOUNDSOURCEIDENTIFIERISSUE_H
15#define EFORMAT_UNBOUNDSOURCEIDENTIFIERISSUE_H
16
17#include "eformat/Issue.h"
18#include <cstdlib>
19#include <stdint.h>
20
21namespace eformat {
22
23 /**
24 * This exception is supposed to be thrown when I find a old source
25 * identifier I cannot map to a new one
26 */
28
29 public: //interface
30
31 /**
32 * Builds a new bad-version exception
33 *
34 * @param context The Error Reporting System context to be used to identify
35 * the spot where this issue was created
36 * @param severity The severity of this issue
37 * @param source_id The source identifier I'm having problems to map
38 * @param my_context An explanation of the context.
39 */
42 uint32_t source_id,
43 const std::string& my_context);
44
45 /**
46 * Destructor virtualisation
47 */
48 virtual ~UnboundSourceIdentifierIssue() throw() {}
49
50 /**
51 * Access the current source identifier the user is having problems with
52 */
53 uint32_t source_id () const;
54
55 /**
56 * Access the context explanation
57 */
58 const std::string& my_context () const;
59
60 };
61
62}
63
64/**
65 * Simplifies the use of this Issue
66 *
67 * @param source_id The source identifier I cannot map
68 * @param cont The context in which I found it
69 */
70#define EFORMAT_UNBOUND_SOURCE_IDENTIFIER(sid, cont) \
71 eformat::UnboundSourceIdentifierIssue(ERS_HERE, ers::error, sid, cont)
72
73#endif /* EFORMAT_UNBOUNDSOURCEIDENTIFIERISSUE_H */
Source context for Issue.
Definition: Context.h:42
severity_t severity() const
severity_t of the issue
Defines the base eformat Issue.
enum ers::_severity_t severity_t