esphome-api-client 0.5.0
Modern C++17 client for the ESPHome native API (plaintext + Noise)
Loading...
Searching...
No Matches
exception.hpp
Go to the documentation of this file.
1#pragma once
2
5
6#include <stdexcept>
7#include <string>
8
9namespace esphome::api {
10
12class ApiError : public std::runtime_error {
13public:
14 using std::runtime_error::runtime_error;
15};
16
18class ConnectionError : public ApiError {
19public:
20 using ApiError::ApiError;
21};
22
25class ProtocolError : public ApiError {
26public:
27 using ApiError::ApiError;
28};
29
32public:
33 using ProtocolError::ProtocolError;
34};
35
42public:
43 using HandshakeError::HandshakeError;
44};
45
48public:
49 using ApiError::ApiError;
50};
51
53class TimeoutError : public ApiError {
54public:
55 using ApiError::ApiError;
56};
57
60public:
61 using ProtocolError::ProtocolError;
62};
63
64} // namespace esphome::api
Base class for every error raised by the library.
Definition exception.hpp:12
Authentication was rejected, or the negotiated API version is unsupported.
Definition exception.hpp:47
TCP-level failure: connect refused, reset, EOF, host unreachable.
Definition exception.hpp:18
A symmetric encrypt/decrypt operation failed (AEAD tag mismatch, bad nonce).
Definition exception.hpp:59
The connection's encryption mode does not match the device: a plaintext client reached a device that ...
Definition exception.hpp:41
The Noise handshake failed (bad PSK, MAC mismatch, unexpected message).
Definition exception.hpp:31
The peer violated the framing or message protocol (bad indicator byte, oversized frame,...
Definition exception.hpp:25
An operation did not complete before its deadline.
Definition exception.hpp:53
Definition bytes.hpp:10