userver: protobuf::json::ConversionError< TErrorCode > Class Template Reference
Loading...
Searching...
No Matches
protobuf::json::ConversionError< TErrorCode > Class Template Reference

#include </data/code/userver/libraries/protobuf/include/userver/protobuf/json/exceptions.hpp>

Detailed Description

template<typename TErrorCode>
class protobuf::json::ConversionError< TErrorCode >

JSON/protobuf conversion error.

Template Parameters
TErrorCodeerror code type

Definition at line 102 of file exceptions.hpp.

+ Inheritance diagram for protobuf::json::ConversionError< TErrorCode >:

Public Types

using ErrorInfoType = ConversionErrorInfo<TErrorCode>
 
using ErrorCodeType = typename ErrorInfoType::ErrorCodeType
 

Public Member Functions

 ConversionError (ErrorCodeType code, std::string path)
 Creates error for invalid json/protobuf field identified by path . See ConversionErrorInfo::ConversionErrorInfo for more information about path format.
 
const ErrorInfoTypeGetErrorInfo () const &noexcept
 Returns information about occurred error.
 
ErrorInfoType GetErrorInfo () &&noexcept
 Returns information about occurred error.
 

Member Typedef Documentation

◆ ErrorCodeType

template<typename TErrorCode>
using protobuf::json::ConversionError< TErrorCode >::ErrorCodeType = typename ErrorInfoType::ErrorCodeType

Definition at line 105 of file exceptions.hpp.

◆ ErrorInfoType

template<typename TErrorCode>
using protobuf::json::ConversionError< TErrorCode >::ErrorInfoType = ConversionErrorInfo<TErrorCode>

Definition at line 104 of file exceptions.hpp.

Constructor & Destructor Documentation

◆ ConversionError()

template<typename TErrorCode>
protobuf::json::ConversionError< TErrorCode >::ConversionError ( ErrorCodeType code,
std::string path )

Creates error for invalid json/protobuf field identified by path . See ConversionErrorInfo::ConversionErrorInfo for more information about path format.

Definition at line 51 of file exceptions.cpp.

Member Function Documentation

◆ GetErrorInfo() [1/2]

template<typename TErrorCode>
ErrorInfoType protobuf::json::ConversionError< TErrorCode >::GetErrorInfo ( ) &&
inlinenodiscardnoexcept

Returns information about occurred error.

Definition at line 115 of file exceptions.hpp.

◆ GetErrorInfo() [2/2]

template<typename TErrorCode>
const ErrorInfoType & protobuf::json::ConversionError< TErrorCode >::GetErrorInfo ( ) const &
inlinenodiscardnoexcept

Returns information about occurred error.

Definition at line 112 of file exceptions.hpp.


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