1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-03-25 16:43:33 +00:00
OpenMW/tools/str_exception.h

20 lines
374 B
C++

#ifndef __STR_EXCEPTION_H
#define __STR_EXCEPTION_H
#include <exception>
#include <string>
/// A simple exception that takes and returns a string
class str_exception : public std::exception
{
std::string msg;
public:
str_exception(const std::string &m) : msg(m) {}
~str_exception() throw() {}
const char* what() const throw() { return msg.c_str(); }
};
#endif