ClickHouse/base/poco/XML/include/Poco/DOM/EventException.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

85 lines
1.8 KiB
C++
Raw Normal View History

//
// 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"
2023-02-13 09:00:23 +00:00
namespace Poco
{
namespace XML
{
2023-02-13 09:00:23 +00:00
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.
};
2023-02-13 09:00:23 +00:00
EventException(int code);
/// Creates an EventException with the given error code.
2023-02-13 09:00:23 +00:00
EventException(const EventException & exc);
/// Creates an EventException by copying another one.
2023-02-13 09:00:23 +00:00
~EventException() noexcept;
/// Destroys the EventException.
2023-02-13 09:00:23 +00:00
EventException & operator=(const EventException & exc);
2023-02-13 09:00:23 +00:00
const char * name() const noexcept;
/// Returns a static string describing the exception.
2023-02-13 09:00:23 +00:00
const char * className() const noexcept;
/// Returns the name of the exception class.
2023-02-13 09:00:23 +00:00
unsigned short code() const;
/// Returns the Event exception code.
2023-02-13 09:00:23 +00:00
protected:
Poco::Exception * clone() const;
2023-02-13 09:00:23 +00:00
private:
EventException();
};
2023-02-13 09:00:23 +00:00
//
// inlines
//
inline unsigned short EventException::code() const
{
return UNSPECIFIED_EVENT_TYPE_ERR;
}
2023-02-13 09:00:23 +00:00
}
} // namespace Poco::XML
#endif // DOM_EventException_INCLUDED