summaryrefslogtreecommitdiff
path: root/include/llmr/util/pbf.hpp
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2014-03-05 16:46:27 +0100
committerKonstantin Käfer <mail@kkaefer.com>2014-03-05 16:46:27 +0100
commitb0cb2b85b10f4cdb40ae3c9c8083c8f6c9042608 (patch)
treec8fb6bb1e4f10caf2f50d7bf3ba6d9fb56927931 /include/llmr/util/pbf.hpp
parentfc53caf99a3f524a04c01c43f22d13416dcb8198 (diff)
downloadqtlocation-mapboxgl-b0cb2b85b10f4cdb40ae3c9c8083c8f6c9042608.tar.gz
return meaningful error codes
Diffstat (limited to 'include/llmr/util/pbf.hpp')
-rw-r--r--include/llmr/util/pbf.hpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/llmr/util/pbf.hpp b/include/llmr/util/pbf.hpp
index 2e99cd91cb..13fe8d6ee1 100644
--- a/include/llmr/util/pbf.hpp
+++ b/include/llmr/util/pbf.hpp
@@ -14,11 +14,11 @@
namespace llmr {
struct pbf {
- struct exception : std::exception {};
- struct unterminated_varint_exception : exception {};
- struct varint_too_long_exception : exception {};
- struct unknown_field_type_exception : exception {};
- struct end_of_buffer_exception : exception {};
+ struct exception : std::exception { const char *what() const noexcept { return "pbf exception"; } };
+ struct unterminated_varint_exception : exception { const char *what() const noexcept { return "pbf unterminated varint exception"; } };
+ struct varint_too_long_exception : exception { const char *what() const noexcept { return "pbf varint too long exception"; } };
+ struct unknown_field_type_exception : exception { const char *what() const noexcept { return "pbf unknown field type exception"; } };
+ struct end_of_buffer_exception : exception { const char *what() const noexcept { return "pbf end of buffer exception"; } };
inline pbf(const unsigned char *data, size_t length);
inline pbf();