SRSDK  0.10.39
Loading...
Searching...
No Matches
exception.hpp
Go to the documentation of this file.
1#ifndef CNSDK_LEIA_CORE_CXX_EXCEPTION_HPP
2#define CNSDK_LEIA_CORE_CXX_EXCEPTION_HPP
3
9#ifdef LEIA_DOXYGEN
14# define LEIA_WRAPPER_DISABLE_EXCEPTION
15#endif
16
17#if !defined(LEIA_WRAPPER_DISABLE_EXCEPTION)
18# include <stdexcept>
19#endif // !LEIA_WRAPPER_DISABLE_EXCEPTION
20
21namespace leia {
22
23#if !defined(LEIA_WRAPPER_DISABLE_EXCEPTION)
24
28struct CoreException : public std::exception {
29 const char* what() const noexcept override
30 {
31 return "core generic error";
32 }
33};
34
38struct CoreInitFailed : public CoreException {
39 const char* what() const noexcept override
40 {
41 return "initialization failed";
42 }
43};
44
45#endif // !LEIA_WRAPPER_DISABLE_EXCEPTION
46
47} // namespace leia
48
53#endif // CNSDK_LEIA_CORE_CXX_EXCEPTION_HPP
Definition types.hpp:10