hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
shared_model::validation::ValidationErrorCreator Class Reference

Helper class for ValidationError creation. More...

#include "validation_error_helpers.hpp"

Collaboration diagram for shared_model::validation::ValidationErrorCreator:
Collaboration graph

Public Member Functions

boost::optional< ValidationErrorgetValidationError (const ReasonName &name) &&
 
template<typename NameProvider >
boost::optional< ValidationErrorgetValidationErrorWithGeneratedName (NameProvider &&name_provider) &&
 
ValidationErrorCreatoraddReason (ReasonType reason)
 Add a reason to error. More...
 
ValidationErrorCreatoraddChildError (ValidationError error)
 Add a child error. More...
 
ValidationErrorCreatoroperator|= (boost::optional< ReasonType > optional_reason)
 Add a reason, if any. More...
 
ValidationErrorCreatoroperator|= (boost::optional< ValidationError > optional_error)
 Add a child error, if any. More...
 

Detailed Description

Helper class for ValidationError creation.

Member Function Documentation

◆ addChildError()

ValidationErrorCreator & ValidationErrorCreator::addChildError ( ValidationError  error)

Add a child error.

Here is the caller graph for this function:

◆ addReason()

ValidationErrorCreator & ValidationErrorCreator::addReason ( ReasonType  reason)

Add a reason to error.

Here is the caller graph for this function:

◆ getValidationError()

boost::optional< ValidationError > ValidationErrorCreator::getValidationError ( const ReasonName name) &&

Extract the error, if any.

Parameters
name- the name of resulting error, if any.
Here is the caller graph for this function:

◆ getValidationErrorWithGeneratedName()

template<typename NameProvider >
boost::optional<ValidationError> shared_model::validation::ValidationErrorCreator::getValidationErrorWithGeneratedName ( NameProvider &&  name_provider) &&
inline

Extract the error, if any.

Parameters
name_provider- a callable providing the name of resulting error, if any.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator|=() [1/2]

ValidationErrorCreator & ValidationErrorCreator::operator|= ( boost::optional< ReasonType optional_reason)

Add a reason, if any.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator|=() [2/2]

ValidationErrorCreator & ValidationErrorCreator::operator|= ( boost::optional< ValidationError optional_error)

Add a child error, if any.

Here is the call graph for this function:

The documentation for this class was generated from the following files: