Coverage Report

Created: 2026-12-03 06:40

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/poco/XML/include/Poco/DOM/EventException.h
Line
Count
Source
1
//
2
// EventException.h
3
//
4
// Library: XML
5
// Package: DOM
6
// Module:  DOMEvents
7
//
8
// Definition of the DOM EventException class.
9
//
10
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
11
// and Contributors.
12
//
13
// SPDX-License-Identifier: BSL-1.0
14
//
15
16
17
#ifndef DOM_EventException_INCLUDED
18
#define DOM_EventException_INCLUDED
19
20
21
#include "Poco/XML/XML.h"
22
#include "Poco/XML/XMLException.h"
23
24
25
namespace Poco::XML {
26
27
28
class XML_API EventException: public XMLException
29
  /// Event operations may throw an EventException as
30
  /// specified in their method descriptions.
31
{
32
public:
33
  enum
34
  {
35
    UNSPECIFIED_EVENT_TYPE_ERR = 0  /// If the Event's type was not specified by initializing the
36
                                    /// event before the method was called. Specification of the Event's
37
                                        /// type as null or an empty string will also trigger this exception.
38
  };
39
40
  EventException(int code);
41
    /// Creates an EventException with the given error code.
42
43
  EventException(const EventException& exc);
44
    /// Creates an EventException by copying another one.
45
46
  ~EventException() noexcept;
47
    /// Destroys the EventException.
48
49
  EventException& operator = (const EventException& exc);
50
51
  [[nodiscard]] const char* name() const noexcept;
52
    /// Returns a static string describing the exception.
53
54
  [[nodiscard]] const char* className() const noexcept;
55
    /// Returns the name of the exception class.
56
57
  [[nodiscard]] unsigned short code() const;
58
    /// Returns the Event exception code.
59
60
protected:
61
  [[nodiscard]] Exception* clone() const;
62
63
private:
64
  EventException();
65
};
66
67
68
//
69
// inlines
70
//
71
inline unsigned short EventException::code() const
72
0
{
73
0
  return UNSPECIFIED_EVENT_TYPE_ERR;
74
0
}
75
76
77
} // namespace Poco::XML
78
79
80
#endif // DOM_EventException_INCLUDED