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