azure-messaging-eventhubs
Loading...
Searching...
No Matches
eventhubs_exception.hpp
1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT License.
3
4#pragma once
5
6#include <azure/core/amqp/internal/models/amqp_error.hpp>
7
8#include <stdexcept>
9#include <string>
10namespace Azure { namespace Messaging { namespace EventHubs { namespace _detail {
11 class EventHubsExceptionFactory;
12}}}} // namespace Azure::Messaging::EventHubs::_detail
13
14namespace Azure { namespace Messaging { namespace EventHubs {
15
19 class EventHubsException final : public std::runtime_error {
20 public:
26 explicit EventHubsException(const std::string& what)
27 : std::runtime_error(what), ErrorDescription{what}
28 {
29 }
30
38 std::string ErrorCondition{};
39
47 std::string ErrorDescription;
48
57 Azure::Nullable<std::uint32_t> StatusCode{};
58
66
67 friend _detail::EventHubsExceptionFactory;
68 };
69}}} // namespace Azure::Messaging::EventHubs
An exception thrown when an EventHubs service operation fails.
Definition eventhubs_exception.hpp:19
std::string ErrorDescription
A description of the error intended for the developer to understand what the error refers to and how ...
Definition eventhubs_exception.hpp:47
bool IsTransient
Indicates whether the error is transient in nature.
Definition eventhubs_exception.hpp:65
Azure::Nullable< std::uint32_t > StatusCode
The status code associated with the error, if any.
Definition eventhubs_exception.hpp:57
std::string ErrorCondition
A symbolic value indicating the error condition.
Definition eventhubs_exception.hpp:38
EventHubsException(const std::string &what)
Constructs a EventHubsException with a message.
Definition eventhubs_exception.hpp:26