Add basic class along with exception and attach

Signed-off-by: varun-r-mallya <varunrmallya@gmail.com>
This commit is contained in:
2025-09-21 14:27:07 +05:30
parent ecefff6b81
commit 3c8c6deb68
8 changed files with 156 additions and 53 deletions

16
src/core/bpf_exception.h Normal file
View File

@ -0,0 +1,16 @@
#ifndef PYLIBBPF_BPF_EXCEPTION_H
#define PYLIBBPF_BPF_EXCEPTION_H
#include <stdexcept>
#include <string>
class BpfException final : public std::runtime_error {
public:
explicit BpfException(const std::string& message)
: std::runtime_error(message) {}
explicit BpfException(const char* message)
: std::runtime_error(message) {}
};
#endif // PYLIBBPF_BPF_EXCEPTION_H