Include the filename in the error messages
This commit is contained in:
@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user