26 lines
502 B
C++
26 lines
502 B
C++
#include "elna/source/result.hpp"
|
|
|
|
namespace elna::source
|
|
{
|
|
error::error(const char *message, const source::position position) noexcept
|
|
{
|
|
this->message = message;
|
|
this->position = position;
|
|
}
|
|
|
|
char const *error::what() const noexcept
|
|
{
|
|
return this->message;
|
|
}
|
|
|
|
std::size_t error::line() const noexcept
|
|
{
|
|
return this->position.line;
|
|
}
|
|
|
|
std::size_t error::column() const noexcept
|
|
{
|
|
return this->position.column;
|
|
}
|
|
}
|