#include </data/code/userver/libraries/protobuf/include/userver/protobuf/json/exceptions.hpp>
JSON/protobuf conversion error information.
| TErrorCode | error code type |
Definition at line 49 of file exceptions.hpp.
Public Types | |
| using | ErrorCodeType = TErrorCode |
Public Member Functions | |
| ConversionErrorInfo (const ErrorCodeType code, std::string path) noexcept | |
| Creates error information for invalid JSON/protobuf field identified by path . See ConversionErrorInfo::GetPath for more information about path format. | |
| ErrorCodeType | GetCode () const noexcept |
| Returns error code. | |
| const std::string & | GetPath () const &noexcept |
| Returns invalid field path. Parameter path format depends on the conversion direction: | |
| std::string | GetPath () &&noexcept |
| Returns invalid field path. See ConversionErrorInfo::GetPath for more information about path format. | |
| using protobuf::json::ConversionErrorInfo< TErrorCode, typename >::ErrorCodeType = TErrorCode |
Definition at line 51 of file exceptions.hpp.
|
inlinenoexcept |
Creates error information for invalid JSON/protobuf field identified by path . See ConversionErrorInfo::GetPath for more information about path format.
Definition at line 55 of file exceptions.hpp.
|
inlinenodiscardnoexcept |
Returns error code.
Definition at line 58 of file exceptions.hpp.
|
inlinenodiscardnoexcept |
Returns invalid field path. See ConversionErrorInfo::GetPath for more information about path format.
Definition at line 74 of file exceptions.hpp.
|
inlinenodiscardnoexcept |
Returns invalid field path. Parameter path format depends on the conversion direction:
ValueBuilder and Value class methods (seeformats::json::ExceptionWithPath): / (root), field.array[0].item, etc. Field names will be taken from JSON and may not match target field names in the protobuf message (ProtoJSON by default uses lowerCamelCase-encoded protobuf field names as JSON field names).map types will be handled explicitly. Examples: / (root), ‘field.repeated[0].item.map['key’].value`, etc. Field names will be taken from the protobuf message and may not match target field names in the JSON. Definition at line 70 of file exceptions.hpp.