-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathexception.h
More file actions
33 lines (24 loc) · 856 Bytes
/
exception.h
File metadata and controls
33 lines (24 loc) · 856 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// libcachesim_python - libCacheSim Python bindings
// Copyright 2025 The libcachesim Authors. All rights reserved.
//
// Use of this source code is governed by a GPL-3.0
// license that can be found in the LICENSE file or at
// https://github.com/1a1a11a/libcachesim/blob/develop/LICENSE
#pragma once
#include <pybind11/pybind11.h>
#include <stdexcept>
#include <string>
namespace libcachesim {
namespace py = pybind11;
class CacheException : public std::runtime_error {
public:
explicit CacheException(const std::string& message)
: std::runtime_error("CacheException: " + message) {}
};
class ReaderException : public std::runtime_error {
public:
explicit ReaderException(const std::string& message)
: std::runtime_error("ReaderException: " + message) {}
};
void register_exception(py::module& m);
} // namespace libcachesim