home/src/exception.hh
2012-04-14 01:17:09 +00:00

33 lines
485 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 { return m_description; }
private:
String m_description;
};
struct logic_error : exception
{
};
}
#endif // exception_hh_INCLUDED