roza/lib/StatusLog.cpp

24 lines
394 B
C++
Raw Normal View History

2023-08-30 18:06:26 +00:00
#include "StatusLog.hpp"
#include <stdexcept>
namespace roza
{
/*explicit*/ StatusLog::StatusLog()
{
}
/*virtual*/ StatusLog::~StatusLog()
{
}
void StatusLog::fatal(SrcLoc loc, std::string const& what)
{
std::stringstream ss;
ss << loc.source_file().string()
<< ":" << loc.line() << " [FATAL ERROR] " << what;
throw std::runtime_error {ss.str()};
}
}