nodeos_exceptions.hpp 720 Bytes
Newer Older
Swann Perarnau's avatar
Swann Perarnau committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
#ifndef  __NODEOS_EXCEPTIONS_HPP__
#define __NODEOS_EXCEPTIONS_HPP__

#include <stdexcept>
#include <string>

class User_option_exception: public std::runtime_error
{
	public:
		explicit User_option_exception (const std::string& what_arg):
			std::runtime_error("[Bad input]:" + what_arg){}
};

class Erroneous_action_exception: public std::runtime_error
{
	public:
		explicit Erroneous_action_exception(const std::string& what_arg):
			std::runtime_error("[Erroneous]:" + what_arg){}
};

class Forbidden_action_exception: public std::runtime_error 
{
	public:
		explicit Forbidden_action_exception(const std::string& what_arg):
			std::runtime_error("[Forbidden]:" + what_arg){}
};


#endif //__NODEOS_EXCEPTIONS_HPP__