mirror of
https://github.com/mawww/kakoune.git
synced 2024-12-20 01:41:40 +03:00
33 lines
494 B
C++
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
|