5#include "slideio/base/log.hpp"
13 struct RuntimeError :
public std::exception {
15 RuntimeError& operator << (T rhs) {
19 RuntimeError() =
default;
20 RuntimeError(RuntimeError& rhs) {
21 std::string message = rhs.m_innerStream.str();
23 SLIDEIO_LOG(ERROR) << message;
25 m_innerStream << message;
27 virtual const char* what()
const noexcept {
28 m_message = m_innerStream.str();
29 return m_message.c_str();
32 std::stringstream m_innerStream;
33 mutable std::string m_message;
38#define RAISE_RUNTIME_ERROR throw slideio::RuntimeError() << __FILE__ << ":" << __LINE__ << ":"
Definition: exceptions.hpp:12