OpenAnima 0.2.0
Middleware for conversational NPCs that interact with the player, the world and each other
Loading...
Searching...
No Matches
Public Member Functions | List of all members
OpenAnima::ProviderError Class Reference

The provider answered with a non-success status or with an error payload. More...

#include <Errors.h>

Inheritance diagram for OpenAnima::ProviderError:
OpenAnima::OpenAnimaError

Public Member Functions

 ProviderError (const std::string &message, long statusCode)
 
long statusCode () const noexcept
 
- Public Member Functions inherited from OpenAnima::OpenAnimaError
 OpenAnimaError (const std::string &message)
 

Detailed Description

The provider answered with a non-success status or with an error payload.

Constructor & Destructor Documentation

◆ ProviderError()

OpenAnima::ProviderError::ProviderError ( const std::string &  message,
long  statusCode 
)
inline

Creates an error carrying the status reported by the provider.

Parameters
messageDescription of the failure, including the status when there is one.
statusCodeHTTP status, or 0 when the provider failed without reporting one.

Member Function Documentation

◆ statusCode()

long OpenAnima::ProviderError::statusCode ( ) const
inlinenoexcept
Returns
The HTTP status reported by the provider, or 0 when there is none.

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