2011-09-09 20:40:59 +02:00
|
|
|
#ifndef exception_hh_INCLUDED
|
|
|
|
#define exception_hh_INCLUDED
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
namespace Kakoune
|
|
|
|
{
|
|
|
|
|
|
|
|
struct exception
|
|
|
|
{
|
|
|
|
virtual ~exception() {}
|
|
|
|
virtual std::string description() const;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct runtime_error : exception
|
|
|
|
{
|
2012-03-04 21:10:09 +01:00
|
|
|
runtime_error(const std::string& description)
|
2011-09-09 20:40:59 +02:00
|
|
|
: m_description(description) {}
|
|
|
|
|
|
|
|
std::string description() const { return m_description; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
std::string m_description;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct logic_error : exception
|
|
|
|
{
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // exception_hh_INCLUDED
|