ShlubluLib  v0.5
ShlubluLib is a lightweight, modular, general purpose, open-source C++ library for Linux and Windows.
Python_BindingExceptions.h
Go to the documentation of this file.
1 #pragma once
2 
9 #include <stdexcept>
10 
11 
12 namespace shlublu
13 {
14 
15 namespace Python
16 {
17 
21 class BindingRuntimeError : public std::runtime_error
22 {
23 public:
28  explicit BindingRuntimeError(const std::string& message)
29  : std::runtime_error(("Python binding: " + message).c_str())
30  {}
31 
36  explicit BindingRuntimeError(const char* message)
37  : std::runtime_error(std::string(message))
38  {}
39 };
40 
41 
45 class BindingLogicError : public std::logic_error
46 {
47 public:
52  explicit BindingLogicError(const std::string& message)
53  : logic_error(("Python binding: " + message).c_str())
54  {}
55 
60  explicit BindingLogicError(const char* message)
61  : logic_error(std::string(message))
62  {}
63 };
64 
65 }
66 
67 }
68 
shlublu::Python::BindingLogicError::BindingLogicError
BindingLogicError(const std::string &message)
Constructor.
Definition: Python_BindingExceptions.h:52
shlublu::Python::BindingRuntimeError
Python throws this exception when an issue not detectable in the code happens at run time.
Definition: Python_BindingExceptions.h:22
shlublu::Python::BindingRuntimeError::BindingRuntimeError
BindingRuntimeError(const std::string &message)
Constructor.
Definition: Python_BindingExceptions.h:28
shlublu
shlublu::Python::BindingRuntimeError::BindingRuntimeError
BindingRuntimeError(const char *message)
Constructor.
Definition: Python_BindingExceptions.h:36
shlublu::Python::BindingLogicError::BindingLogicError
BindingLogicError(const char *message)
Constructor.
Definition: Python_BindingExceptions.h:60
shlublu::Python::BindingLogicError
Python throws this exception when an issue expected to be detectable in the code happens at run time.
Definition: Python_BindingExceptions.h:46