FlatCityBuf C++ reader 0.8.0
Native C++17 reader for FlatCityBuf, the cloud-optimized CityJSON format
Loading...
Searching...
No Matches
error.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <stdexcept>
4#include <string>
5
6namespace fcb {
7
26
30class Error : public std::runtime_error {
31 public:
32 Error(ErrorCode code, const std::string& message) : std::runtime_error(message), code_(code) {}
33
34 ErrorCode code() const noexcept { return code_; }
35
36 private:
37 ErrorCode code_;
38};
39
40} // namespace fcb
Every failure the library reports is one of these.
Definition error.hpp:30
ErrorCode code() const noexcept
Definition error.hpp:34
Error(ErrorCode code, const std::string &message)
Definition error.hpp:32
ErrorCode
Error categories, mirroring fcb_core::error::Error (src/rust/fcb_core/src/error.rs) so the two implem...
Definition error.hpp:11