/* This file is part of cpp-ethereum. cpp-ethereum is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. cpp-ethereum is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with cpp-ethereum. If not, see . */ /** @file Exceptions.h * @author Gav Wood * @date 2014 */ #pragma once #include #include "Common.h" namespace dev { namespace eth { // information to add to exceptions using errinfo_name = boost::error_info; using errinfo_field = boost::error_info; using errinfo_data = boost::error_info; using errinfo_nonce = boost::error_info; using errinfo_difficulty = boost::error_info; using errinfo_target = boost::error_info; using errinfo_seedHash = boost::error_info; using errinfo_mixHash = boost::error_info; using errinfo_ethashResult = boost::error_info>; using BadFieldError = boost::tuple; DEV_SIMPLE_EXCEPTION(OutOfGasBase); DEV_SIMPLE_EXCEPTION(OutOfGasIntrinsic); DEV_SIMPLE_EXCEPTION(NotEnoughAvailableSpace); DEV_SIMPLE_EXCEPTION(NotEnoughCash); DEV_SIMPLE_EXCEPTION(GasPriceTooLow); DEV_SIMPLE_EXCEPTION(BlockGasLimitReached); DEV_SIMPLE_EXCEPTION(FeeTooSmall); DEV_SIMPLE_EXCEPTION(TooMuchGasUsed); DEV_SIMPLE_EXCEPTION(ExtraDataTooBig); DEV_SIMPLE_EXCEPTION(InvalidSignature); DEV_SIMPLE_EXCEPTION(InvalidTransactionFormat); DEV_SIMPLE_EXCEPTION(InvalidBlockFormat); DEV_SIMPLE_EXCEPTION(InvalidUnclesHash); DEV_SIMPLE_EXCEPTION(TooManyUncles); DEV_SIMPLE_EXCEPTION(UncleTooOld); DEV_SIMPLE_EXCEPTION(UncleIsBrother); DEV_SIMPLE_EXCEPTION(UncleInChain); DEV_SIMPLE_EXCEPTION(InvalidStateRoot); DEV_SIMPLE_EXCEPTION(InvalidGasUsed); DEV_SIMPLE_EXCEPTION(InvalidTransactionsRoot); DEV_SIMPLE_EXCEPTION(InvalidDifficulty); DEV_SIMPLE_EXCEPTION(InvalidGasLimit); DEV_SIMPLE_EXCEPTION(InvalidReceiptsStateRoot); DEV_SIMPLE_EXCEPTION(InvalidTimestamp); DEV_SIMPLE_EXCEPTION(InvalidLogBloom); DEV_SIMPLE_EXCEPTION(InvalidNonce); DEV_SIMPLE_EXCEPTION(InvalidBlockHeaderItemCount); DEV_SIMPLE_EXCEPTION(InvalidBlockNonce); DEV_SIMPLE_EXCEPTION(InvalidParentHash); DEV_SIMPLE_EXCEPTION(InvalidNumber); DEV_SIMPLE_EXCEPTION(BlockNotFound); DEV_SIMPLE_EXCEPTION(DatabaseAlreadyOpen); DEV_SIMPLE_EXCEPTION(DAGCreationFailure); DEV_SIMPLE_EXCEPTION(DAGComputeFailure); } }