sptk2 logo
SPTK Home Page
Public Member Functions | Static Public Member Functions | List of all members
sptk::HTTPException Class Reference

SOAP exception. More...

#include <Exception.h>

Inheritance diagram for sptk::HTTPException:
sptk::Exception

Public Member Functions

 HTTPException (size_t statusCode, const String &text, const fs::path &file=std::string(), int line=0, const String &description=String()) DOESNT_THROW
 
 HTTPException (const HTTPException &other)=default
 Copy constructor. More...
 
size_t statusCode () const
 
String statusText () const
 
- Public Member Functions inherited from sptk::Exception
 Exception (const String &text, const fs::path &file=std::string(), int line=0, const String &description=String()) DOESNT_THROW
 Constructor. More...
 
const char * what () const DOESNT_THROW override
 Returns complete text of exception.
 
String message () const
 Returns exception message without file name, line number, or description.
 
String file () const
 Returns exception file name.
 
int line () const
 Returns exception line number.
 
String description () const
 Returns exception description.
 

Static Public Member Functions

static String httpResponseStatus (size_t statusCode)
 

Detailed Description

SOAP exception.

Thrown every time when SOAP fault occurs.

Constructor & Destructor Documentation

◆ HTTPException() [1/2]

sptk::HTTPException::HTTPException ( size_t  statusCode,
const String text,
const fs::path &  file = std::string(),
int  line = 0,
const String description = String() 
)

Constructor

Parameters
statusCodeThe HTTP status
textThe exception text
fileThe file where exception occurs
lineThe line number in the file where exception occurs
descriptionThe optional description information

◆ HTTPException() [2/2]

sptk::HTTPException::HTTPException ( const HTTPException other)
default

Copy constructor.

Parameters
otherOther exception object

Member Function Documentation

◆ httpResponseStatus()

static String sptk::HTTPException::httpResponseStatus ( size_t  statusCode)
static

Return standard HTTP response status text for status code

Parameters
statusCode
Returns

◆ statusCode()

size_t sptk::HTTPException::statusCode ( ) const
inline

Get HTTP status code

Returns
HTTP status code

◆ statusText()

String sptk::HTTPException::statusText ( ) const
inline

Get HTTP status text

Returns
HTTP status text

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

Fri Oct 14 2022 09:58:42: SPTK 5.4.1