1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-12-20 01:41:40 +03:00
kakoune/src/exception.hh
2012-09-04 00:17:41 +02:00

33 lines
494 B
C++

#ifndef exception_hh_INCLUDED
#define exception_hh_INCLUDED
#include "string.hh"
namespace Kakoune
{
struct exception
{
virtual ~exception() {}
virtual String description() const;
};
struct runtime_error : exception
{
runtime_error(const String& description)
: m_description(description) {}
String description() const override { return m_description; }
private:
String m_description;
};
struct logic_error : exception
{
};
}
#endif // exception_hh_INCLUDED