libzypp: zyppng::NetworkRequestError Class Reference

libzypp 17.38.11

zyppng::NetworkRequestError Class Reference

The NetworkRequestError class Represents a error that occured in. More...

`#include <zypp-curl/ng/network/networkrequesterror.h>`

## Public Types
enum | Type { NoError = 0 , InternalError , Cancelled , PeerCertificateInvalid , ConnectionFailed , ExceededMaxLen , InvalidChecksum , UnsupportedProtocol , MalformedURL , TemporaryProblem , Timeout , Forbidden , NotFound , Unauthorized , AuthFailed , ServerReturnedError , MissingData , RangeFail , Http2Error , Http2StreamError }

## Public Member Functions
| NetworkRequestError ()
| NetworkRequestError (const NetworkRequestError &)=default
| NetworkRequestError (NetworkRequestError &&) noexcept=default
NetworkRequestError & | operator= (const NetworkRequestError &)=default
NetworkRequestError & | operator= (NetworkRequestError &&) noexcept=default
Type | type () const
| type Returns the type of the error
std::string | toString () const
| toString Returns a string representation of the error
bool | isError () const
| isError Will return true if this is a actual error
template<typename T>
T | extraInfoValue (const std::string &key, T &&defaultVal=T()) const
const std::map< std::string, boost::any > & | extraInfo () const
std::string | nativeErrorString () const

## Protected Member Functions
| NetworkRequestError (NetworkRequestErrorPrivate &d)

## Private Attributes
zypp::RWCOW_pointer< NetworkRequestErrorPrivate > | d_ptr

## Detailed Description

The NetworkRequestError class Represents a error that occured in.

See also
  NetworkDownloadRequest or
  NetworkRequestDispatcher

Attention
  Keep in sync with zypp/zyppng/proto/networkrequest.proto !!!

Definition at line 23 of file networkrequesterror.h.

## Member Enumeration Documentation

## ◆ Type

enum zyppng::NetworkRequestError::Type

Enumerator
NoError |
InternalError |
Cancelled |
PeerCertificateInvalid |
ConnectionFailed |
ExceededMaxLen |
InvalidChecksum |
UnsupportedProtocol |
MalformedURL |
TemporaryProblem |
Timeout |
Forbidden |
NotFound |
Unauthorized |
AuthFailed |
ServerReturnedError |
MissingData |
RangeFail |
Http2Error |
Http2StreamError |

Definition at line 26 of file networkrequesterror.h.

## Constructor & Destructor Documentation

## ◆ NetworkRequestError() [1/4]

zyppng::NetworkRequestError::NetworkRequestError | ( |  | ) |

Definition at line 226 of file networkrequesterror.cc.

## ◆ NetworkRequestError() [2/4]

zyppng::NetworkRequestError::NetworkRequestError | ( | const NetworkRequestError & |  | ) |
| default

## ◆ NetworkRequestError() [3/4]

zyppng::NetworkRequestError::NetworkRequestError | ( | NetworkRequestError && |  | ) |
| defaultnoexcept

## ◆ NetworkRequestError() [4/4]

zyppng::NetworkRequestError::NetworkRequestError | ( | zyppng::NetworkRequestErrorPrivate & | d | ) |
| protected

Definition at line 222 of file networkrequesterror.cc.

## Member Function Documentation

## ◆ operator=() [1/2]

NetworkRequestError & zyppng::NetworkRequestError::operator= | ( | const NetworkRequestError & |  | ) |
| default

## ◆ operator=() [2/2]

NetworkRequestError & zyppng::NetworkRequestError::operator= | ( | NetworkRequestError && |  | ) |
| defaultnoexcept

## ◆ type()

NetworkRequestError::Type zyppng::NetworkRequestError::type | ( |  | ) | const

type Returns the type of the error

Definition at line 230 of file networkrequesterror.cc.

## ◆ toString()

std::string zyppng::NetworkRequestError::toString | ( |  | ) | const

toString Returns a string representation of the error

Definition at line 235 of file networkrequesterror.cc.

## ◆ isError()

bool zyppng::NetworkRequestError::isError | ( |  | ) | const

isError Will return true if this is a actual error

Definition at line 240 of file networkrequesterror.cc.

## ◆ extraInfoValue()

template<typename T>

T zyppng::NetworkRequestError::extraInfoValue | ( | const std::string & | key,
|  | T && | defaultVal = T() ) const
| inline

Tries to find key in the extraInfo map, if the key is not found or the value can not be converted to the requested type defaultVal is returned.

Definition at line 78 of file networkrequesterror.h.

## ◆ extraInfo()

const std::map< std::string, boost::any > & zyppng::NetworkRequestError::extraInfo | ( |  | ) | const

Returns the error extraInfo map.

Definition at line 245 of file networkrequesterror.cc.

## ◆ nativeErrorString()

std::string zyppng::NetworkRequestError::nativeErrorString | ( |  | ) | const

Returns the string returned by the backend if available.

Definition at line 297 of file networkrequesterror.cc.

## Member Data Documentation

## ◆ d_ptr

zypp::RWCOW_pointer<NetworkRequestErrorPrivate> zyppng::NetworkRequestError::d_ptr
| private

Definition at line 104 of file networkrequesterror.h.

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

- zypp-curl/ng/network/networkrequesterror.h
- zypp-curl/ng/network/networkrequesterror.cc