1
1
mirror of https://github.com/mawww/kakoune.git synced 2025-01-05 10:30:41 +03:00
kakoune/src/exception.hh

33 lines
494 B
C++
Raw Normal View History

2011-09-09 22:40:59 +04:00
#ifndef exception_hh_INCLUDED
#define exception_hh_INCLUDED
#include "string.hh"
2011-09-09 22:40:59 +04:00
namespace Kakoune
{
struct exception
{
virtual ~exception() {}
virtual String description() const;
2011-09-09 22:40:59 +04:00
};
struct runtime_error : exception
{
runtime_error(const String& description)
2011-09-09 22:40:59 +04:00
: m_description(description) {}
2012-09-04 02:17:41 +04:00
String description() const override { return m_description; }
2011-09-09 22:40:59 +04:00
private:
String m_description;
2011-09-09 22:40:59 +04:00
};
struct logic_error : exception
{
};
}
#endif // exception_hh_INCLUDED