Include the filename in the error messages

This commit is contained in:
2024-03-30 00:21:58 +01:00
parent 5cf0863e0a
commit 33a951687b
8 changed files with 137 additions and 51 deletions

View File

@ -2,8 +2,8 @@
namespace elna::source
{
error::error(const position position)
: m_position(position)
error::error(const std::filesystem::path& path, const position position)
: m_position(position), m_path(path)
{
}
@ -17,8 +17,14 @@ namespace elna::source
return this->m_position.column;
}
name_collision::name_collision(const std::string& name, const position current, const position previous)
: error(current), name(name), previous(previous)
const std::filesystem::path& error::path() const noexcept
{
return this->m_path;
}
name_collision::name_collision(const std::string& name, const std::filesystem::path& path,
const position current, const position previous)
: error(path, current), name(name), previous(previous)
{
}