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