throw VulkanException("I am throwing a new exception!", VK_ERROR_INCOMPATIBLE_DRIVER);
Results in:
terminate called after throwing an instance of 'inexor::vulkan_renderer::VulkanException'
what(): I am throwing a new exception! (VK_ERROR_INCOMPATIBLE_DRIVER: The requested version of Vulkan is not supported by the driver or is otherwise incompatible for implementation-specific reasons) (file: /home/johannes/Inexor/exception_refactoring/vulkan-renderer/src/vulkan-renderer/render_graph.cpp, line: 85, column: 89, function name: void inexor::vulkan_renderer::RenderGraph::build_buffer(const inexor::vulkan_renderer::BufferResource&, inexor::vulkan_renderer::PhysicalBuffer&) const)
(Note that I didn't add a catch block, so the exception will not be caught properly. However this was only a proof of concept)
Closes #468
Source locations!
C++20 gives us a very nice new feature, std::source_location!
Throwing an example exception from rendergraph:
Results in:
(Note that I didn't add a catch block, so the exception will not be caught properly. However this was only a proof of concept)
This will make debugging a lot easier!