* @brief Vulkan exception structure */
| 33 | * @brief Vulkan exception structure |
| 34 | */ |
| 35 | class VulkanException : public std::runtime_error |
| 36 | { |
| 37 | public: |
| 38 | /** |
| 39 | * @brief Vulkan exception constructor |
| 40 | */ |
| 41 | VulkanException(VkResult result, const std::string &msg = "Vulkan error"); |
| 42 | |
| 43 | /** |
| 44 | * @brief Returns the Vulkan error code as string |
| 45 | * @return String message of exception |
| 46 | */ |
| 47 | const char *what() const noexcept override; |
| 48 | |
| 49 | VkResult result; |
| 50 | |
| 51 | private: |
| 52 | std::string error_message; |
| 53 | }; |
| 54 | } // namespace vkb |
| 55 | |
| 56 | /// @brief Helper macro to test the result of Vulkan calls which can return an error. |
no outgoing calls
no test coverage detected