MXVK Vulkan Framework 0.24.0
C++20 Vulkan rendering framework for practical 2D and 3D application development with SDL3.
Loading...
Searching...
No Matches
exception.hpp
Go to the documentation of this file.
1#ifndef _MXNET_EXCEPT
2#define _MXNET_EXCEPT
3
4#include <iostream>
5#include <string>
6
7namespace mxnetwork {
8 /**
9 * @brief Lightweight exception wrapper for MXNetwork failures.
10 */
11 class Exception {
12 public:
13 /**
14 * @brief Construct an exception with a message.
15 * @param s Error text.
16 */
17 Exception(const std::string &s) : txt{s} {}
18 /**
19 * @brief Return the stored error text.
20 * @return Error text.
21 */
22 std::string text() const;
23
24 protected:
25 std::string txt;
26 };
27} // namespace mxnetwork
28
29#endif
std::string text() const
Return the stored error text.
Definition exception.cpp:5
Exception(const std::string &s)
Construct an exception with a message.
Definition exception.hpp:17