5#include "slideio/base/slideio_base_def.hpp"
11#pragma warning( push )
12#pragma warning(disable: 4251 4275)
16 struct SLIDEIO_BASE_EXPORTS RuntimeError :
public std::exception {
18 RuntimeError& operator << (T rhs) {
22 RuntimeError() =
default;
23 RuntimeError(RuntimeError& rhs) {
24 std::string message = rhs.m_innerStream.str();
28 m_innerStream << message;
30 virtual const char* what()
const noexcept {
31 m_message = m_innerStream.str();
32 return m_message.c_str();
35 void log(
const std::string& message);
37 std::stringstream m_innerStream;
38 mutable std::string m_message;
43#define RAISE_RUNTIME_ERROR throw slideio::RuntimeError() << __FILE__ << ":" << __LINE__ << ":"
Definition: exceptions.hpp:15