hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
error_query_response.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_SHARED_MODEL_QUERY_ERROR_RESPONSE_HPP
7 #define IROHA_SHARED_MODEL_QUERY_ERROR_RESPONSE_HPP
8 
9 #include <boost/variant.hpp>
10 
21 
22 namespace shared_model {
23  namespace interface {
24 
29  class ErrorQueryResponse : public ModelPrimitive<ErrorQueryResponse> {
30  private:
32  template <typename... Value>
33  using w = boost::variant<const Value &...>;
34 
35  public:
46 
48  using QueryResponseListType = QueryErrorResponseVariantType::types;
49 
53  virtual const QueryErrorResponseVariantType &get() const = 0;
54 
57 
61  virtual const ErrorMessageType &errorMessage() const = 0;
62 
64  using ErrorCodeType = uint32_t;
65 
73  virtual ErrorCodeType errorCode() const = 0;
74 
75  // ------------------------| Primitive override |-------------------------
76 
77  std::string toString() const override;
78 
79  bool operator==(const ModelType &rhs) const override;
80  };
81  } // namespace interface
82 } // namespace shared_model
83 #endif // IROHA_SHARED_MODEL_QUERY_ERROR_RESPONSE_HPP
std::string toString() const override
Definition: error_query_response.cpp:13
TrivialProto< interface::NoAssetErrorResponse, iroha::protocol::ErrorResponse > NoAssetErrorResponse
Definition: proto_concrete_error_query_response.hpp:45
TrivialProto< interface::StatelessFailedErrorResponse, iroha::protocol::ErrorResponse > StatelessFailedErrorResponse
Definition: proto_concrete_error_query_response.hpp:25
TrivialProto< interface::NoAccountAssetsErrorResponse, iroha::protocol::ErrorResponse > NoAccountAssetsErrorResponse
Definition: proto_concrete_error_query_response.hpp:34
Definition: error_query_response.hpp:29
Definition: no_roles_error_response.hpp:18
std::string ErrorMessageType
Message type.
Definition: error_query_response.hpp:56
w< StatelessFailedErrorResponse, StatefulFailedErrorResponse, NoAccountErrorResponse, NoAccountAssetsErrorResponse, NoAccountDetailErrorResponse, NoSignatoriesErrorResponse, NotSupportedErrorResponse, NoAssetErrorResponse, NoRolesErrorResponse > QueryErrorResponseVariantType
Type of container with all concrete error query responses.
Definition: error_query_response.hpp:45
virtual ErrorCodeType errorCode() const =0
string(REPLACE".""/"CMAKE_SWIG_OUTDIR ${SWIG_JAVA_PKG}) else() set(CMAKE_SWIG_FLAGS"") endif() myswig_add_library(irohajava LANGUAGE java SOURCES bindings.i) unset(CMAKE_SWIG_FLAGS) swig_link_libraries(irohajava $
Definition: CMakeLists.txt:54
TrivialProto< interface::StatefulFailedErrorResponse, iroha::protocol::ErrorResponse > StatefulFailedErrorResponse
Definition: proto_concrete_error_query_response.hpp:28
TrivialProto< interface::NoAccountDetailErrorResponse, iroha::protocol::ErrorResponse > NoAccountDetailErrorResponse
Definition: proto_concrete_error_query_response.hpp:37
TrivialProto< interface::NoSignatoriesErrorResponse, iroha::protocol::ErrorResponse > NoSignatoriesErrorResponse
Definition: proto_concrete_error_query_response.hpp:40
bool operator==(const ModelType &rhs) const override
Definition: error_query_response.cpp:21
virtual const ErrorMessageType & errorMessage() const =0
uint32_t ErrorCodeType
Error code type.
Definition: error_query_response.hpp:64
TrivialProto< interface::NotSupportedErrorResponse, iroha::protocol::ErrorResponse > NotSupportedErrorResponse
Definition: proto_concrete_error_query_response.hpp:43
QueryErrorResponseVariantType::types QueryResponseListType
Type list with all concrete query error responses.
Definition: error_query_response.hpp:48
Definition: model_primitive.hpp:23
TrivialProto< interface::NoAccountErrorResponse, iroha::protocol::ErrorResponse > NoAccountErrorResponse
Definition: proto_concrete_error_query_response.hpp:31
Definition: command_executor.hpp:12