github.com/muhammedhassanm/blockchain@v0.0.0-20200120143007-697261defd4d/sawtooth-core-master/validator/sawtooth_validator/exceptions.py (about) 1 # Copyright 2017 Intel Corporation 2 # 3 # Licensed under the Apache License, Version 2.0 (the "License"); 4 # you may not use this file except in compliance with the License. 5 # You may obtain a copy of the License at 6 # 7 # http://www.apache.org/licenses/LICENSE-2.0 8 # 9 # Unless required by applicable law or agreed to in writing, software 10 # distributed under the License is distributed on an "AS IS" BASIS, 11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 # See the License for the specific language governing permissions and 13 # limitations under the License. 14 # ------------------------------------------------------------------------------ 15 16 17 class LocalConfigurationError(Exception): 18 """ 19 General error thrown when a local configuration issue should prevent 20 the validator from starting. 21 """ 22 pass 23 24 25 class GenesisError(Exception): 26 """ 27 General Error thrown when an error occurs as a result of an incomplete 28 or erroneous genesis action. 29 """ 30 pass 31 32 33 class InvalidGenesisStateError(GenesisError): 34 """ 35 Error thrown when there is an invalid initial state during the genesis 36 block generation process. 37 """ 38 pass 39 40 41 class InvalidGenesisConsensusError(GenesisError): 42 """ 43 Error thrown when the consensus algorithm refuses or fails to initialize 44 or finalize the genesis block. 45 """ 46 pass 47 48 49 class NotAvailableException(Exception): 50 """ 51 Indicates a required service is not available and the action should be 52 tried again later. 53 """ 54 pass 55 56 57 class UnknownConsensusModuleError(Exception): 58 """Error thrown when there is an invalid consensus module configuration. 59 """ 60 pass 61 62 63 class PeeringException(Exception): 64 """ 65 Indicates that a request to peer with this validator should not be allowed. 66 """ 67 pass 68 69 70 class PossibleForkDetectedError(Exception): 71 """Exception thrown when a possible fork has occurred while iterating 72 through the block store. 73 """ 74 pass 75 76 77 class NoProcessorVacancyError(Exception): 78 """Error thrown when no processor has occupancy to handle a transaction 79 """ 80 pass 81 82 83 class WaitCancelledException(Exception): 84 """Exception thrown when a wait function has detected a cancellation event 85 """ 86 pass