protozero: include/protozero/exception.hpp Source File

protozero 1.8.1 Minimalistic protocol buffer decoder and encoder in C++.

Loading...
Searching...
No Matches
exception.hpp
Go to the documentation of this file.
1#ifndef PROTOZERO_EXCEPTION_HPP
2#define PROTOZERO_EXCEPTION_HPP
3
4/*****************************************************************************
5
6protozero - Minimalistic protocol buffer decoder and encoder in C++.
7
8This file is from https://github.com/mapbox/protozero where you can find more
9documentation.
10
11*****************************************************************************/
12
18
19#include <exception>
20
24namespace protozero {
25
30 struct exception : std::exception {
32 const char* what() const noexcept override {
33 return "pbf exception";
34 }
35};
36
41 struct varint_too_long_exception : exception {
43 const char* what() const noexcept override {
44 return "varint too long exception";
45 }
46};
47
52 struct unknown_pbf_wire_type_exception : exception {
54 const char* what() const noexcept override {
55 return "unknown pbf field type exception";
56 }
57};
58
67 struct end_of_buffer_exception : exception {
69 const char* what() const noexcept override {
70 return "end of buffer exception";
71 }
72};
73
80 struct invalid_tag_exception : exception {
82 const char* what() const noexcept override {
83 return "invalid tag exception";
84 }
85};
86
92 struct invalid_length_exception : exception {
94 const char* what() const noexcept override {
95 return "invalid length exception";
96 }
97};
98
99} // end namespace protozero
100
101#endif // PROTOZERO_EXCEPTION_HPP
protozero
All parts of the protozero header-only library are in this namespace.
Definition basic_pbf_builder.hpp:24
protozero::end_of_buffer_exception
Definition exception.hpp:67
protozero::end_of_buffer_exception::what
const char * what() const noexcept override
Returns the explanatory string.
Definition exception.hpp:69
protozero::exception
Definition exception.hpp:30
protozero::exception::what
const char * what() const noexcept override
Returns the explanatory string.
Definition exception.hpp:32
protozero::invalid_length_exception
Definition exception.hpp:92
protozero::invalid_length_exception::what
const char * what() const noexcept override
Returns the explanatory string.
Definition exception.hpp:94
protozero::invalid_tag_exception
Definition exception.hpp:80
protozero::invalid_tag_exception::what
const char * what() const noexcept override
Returns the explanatory string.
Definition exception.hpp:82
protozero::unknown_pbf_wire_type_exception
Definition exception.hpp:52
protozero::unknown_pbf_wire_type_exception::what
const char * what() const noexcept override
Returns the explanatory string.
Definition exception.hpp:54
protozero::varint_too_long_exception
Definition exception.hpp:41
protozero::varint_too_long_exception::what
const char * what() const noexcept override
Returns the explanatory string.
Definition exception.hpp:43