nodeos_exceptions.hpp 1.09 KB
Newer Older
1 2 3 4 5 6 7 8 9 10
/*******************************************************************************
 * Copyright 2019 UChicago Argonne, LLC.
 * (c.f. AUTHORS, LICENSE)
 *
 * This file is part of the Argo containers project.
 * For more info, see https://xgitlab.cels.anl.gov/argo/containers
 *
 * SPDX-License-Identifier: BSD-3-Clause
*******************************************************************************/

Swann Perarnau's avatar
Swann Perarnau committed
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
#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__