roza/lib/StatusLog.cpp

24 lines
394 B
C++

#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()};
}
}