refactor(cleanup): non-wrapped error constructor

This commit is contained in:
PancakeTAS 2025-12-14 23:08:55 +01:00
parent d8888a2caf
commit 69a9767551
3 changed files with 12 additions and 0 deletions

View file

@ -10,6 +10,8 @@ option(LSFGVK_BUILD_DEBUG_TOOL
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

View file

@ -28,6 +28,13 @@ namespace lsfgvk {
///
explicit error(const std::string& msg, const std::exception& inner);
///
/// Construct an error
///
/// @param msg Error message.
///
explicit error(const std::string& msg);
~error() override;
};

View file

@ -552,4 +552,7 @@ Instance::~Instance() = default;
error::error(const std::string& msg, const std::exception& inner)
: std::runtime_error(msg + "\n- " + inner.what()) {}
error::error(const std::string& msg)
: std::runtime_error(msg) {}
error::~error() = default;