hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
validation_error.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_VALIDATION_ERROR_HPP
7 #define IROHA_VALIDATION_ERROR_HPP
8 
9 #include <string>
10 #include <vector>
11 
12 namespace shared_model {
13  namespace validation {
14 
15  using ReasonType = std::string;
16  using ReasonName = std::string;
17 
19  struct ValidationError {
21  std::vector<ReasonType> errors,
22  std::vector<ValidationError> child_errors = {});
23 
24  std::string toString() const;
25 
28 
30  std::vector<ReasonType> my_errors;
31  std::vector<ValidationError> child_errors;
32  };
33 
34  } // namespace validation
35 } // namespace shared_model
36 
37 #endif
Represents a validation error.
Definition: validation_error.hpp:19
ReasonName name
Error reason kind.
Definition: validation_error.hpp:29
std::string ReasonType
Definition: validation_error.hpp:15
std::string toString() const
Definition: validation_error.cpp:36
ValidationError & operator|=(ValidationError other)
Merge another validation error into this.
Definition: validation_error.cpp:23
ValidationError(ReasonName name, std::vector< ReasonType > errors, std::vector< ValidationError > child_errors={})
Definition: validation_error.cpp:16
std::vector< ReasonType > my_errors
Errors of this kind.
Definition: validation_error.hpp:30
std::string ReasonName
Definition: validation_error.hpp:16
Definition: command_executor.hpp:12
std::vector< ValidationError > child_errors
Subkind errors.
Definition: validation_error.hpp:31