10Duke Scale C++ Client
Loading...
Searching...
No Matches
tenduke::se::http::HTTPResponseToAPIException Class Reference

#include <HTTPResponseToAPIException.h>

Detailed Description

10Duke Scale specific service for mapping HTTP responses to exceptions.

Inheritance diagram for tenduke::se::http::HTTPResponseToAPIException:
tenduke::http::HTTPResponseToException

Public Member Functions

 HTTPResponseToAPIException (const std::shared_ptr< const tenduke::json::JSONParser > &parseJson)
 Constructs new instance.
 
- Public Member Functions inherited from tenduke::http::HTTPResponseToException
virtual void basedOn (tenduke::http::HTTPResponse &response) const
 Throws exception based on given HTTP response.
 

Protected Member Functions

void from4xx (tenduke::http::HTTPResponse &response) const override
 Throws appropriate exceptions, when HTTP status code is 4xx.
 
void from5xx (tenduke::http::HTTPResponse &response) const override
 Throws appropriate exceptions, when HTTP status code is 5xx.
 
- Protected Member Functions inherited from tenduke::http::HTTPResponseToException
virtual void from4xx (int httpStatusCode) const
 Throws exception, when HTTP-status code is 4xx.
 
virtual void from400 () const
 Throws exception, when HTTP-status code is 400.
 
virtual void from401 () const
 Throws exception, when HTTP-status code is 401.
 
virtual void from403 () const
 Throws exception, when HTTP-status code is 403.
 
virtual void from404 () const
 Throws exception, when HTTP-status code is 404.
 
virtual void from4xxOther (int httpStatusCode) const
 Throws exception, when HTTP-status code some other 4xx-series.
 
virtual void from5xx (int httpStatusCode) const
 Throws exception, when status code is any 5xx-series.
 

Constructor & Destructor Documentation

◆ HTTPResponseToAPIException()

tenduke::se::http::HTTPResponseToAPIException::HTTPResponseToAPIException ( const std::shared_ptr< const tenduke::json::JSONParser > &  parseJson)
explicit

Constructs new instance.

Parameters
parseJson-

Member Function Documentation

◆ from4xx()

void tenduke::se::http::HTTPResponseToAPIException::from4xx ( tenduke::http::HTTPResponse response) const
overrideprotectedvirtual

Throws appropriate exceptions, when HTTP status code is 4xx.

Parameters
response-

Reimplemented from tenduke::http::HTTPResponseToException.

◆ from5xx()

void tenduke::se::http::HTTPResponseToAPIException::from5xx ( tenduke::http::HTTPResponse response) const
overrideprotectedvirtual

Throws appropriate exceptions, when HTTP status code is 5xx.

Parameters
response-

Reimplemented from tenduke::http::HTTPResponseToException.


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