bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
http::HttpError Class Reference
Inheritance diagram for http::HttpError:
Inheritance graph
Collaboration diagram for http::HttpError:
Collaboration graph

Public Member Functions

void add_my_error_details_to (BESInfo &info) const override
 
CURLcode curl_code () const
 
std::string dump () const
 Returns a string describing this object and its state.
 
void dump (std::ostream &strm) const override
 dumps information about this object
 
std::string error_name () const override
 
unsigned int get_bes_error_type () const
 Return the return code for this error class.
 
std::string get_file () const
 get the file name where the exception was thrown
 
unsigned int get_line () const
 get the line number where the exception was thrown
 
std::string get_message () const
 get the error message for this exception
 
virtual std::string get_verbose_message () const
 
long http_status () const
 
 HttpError (const HttpError &src)=default
 
 HttpError (const std::string &msg, const CURLcode code, const long http_status, const std::string &origin_url, const std::string &redirect_url, const std::string &file, const int line)
 
 HttpError (const std::string &msg, const CURLcode code, const long http_status, const std::string &origin_url, const std::string &redirect_url, const std::vector< std::string > &response_headers, const std::string &response_body, const std::string &file, const int line)
 
 HttpError (std::string msg, std::string file, unsigned int line)
 
std::string origin_url () const
 
std::string redirect_url () const
 
std::string response_body () const
 
std::vector< std::string > response_headers () const
 
void set_bes_error_type (unsigned int type)
 Set the return code for this particular error class.
 
void set_message (const std::string &msg)
 set the error message for this exception
 
const char * what () const noexcept override
 Return a brief message about the exception.
 

Detailed Description

Definition at line 42 of file HttpError.h.

Constructor & Destructor Documentation

◆ HttpError() [1/3]

http::HttpError::HttpError ( const std::string & msg,
const CURLcode code,
const long http_status,
const std::string & origin_url,
const std::string & redirect_url,
const std::vector< std::string > & response_headers,
const std::string & response_body,
const std::string & file,
const int line )
inline

Definition at line 53 of file HttpError.h.

◆ HttpError() [2/3]

http::HttpError::HttpError ( const std::string & msg,
const CURLcode code,
const long http_status,
const std::string & origin_url,
const std::string & redirect_url,
const std::string & file,
const int line )
inline

Definition at line 70 of file HttpError.h.

◆ HttpError() [3/3]

http::HttpError::HttpError ( std::string msg,
std::string file,
unsigned int line )
inline

Definition at line 83 of file HttpError.h.

Member Function Documentation

◆ add_my_error_details_to()

void http::HttpError::add_my_error_details_to ( BESInfo & ) const
overridevirtual

Used to add error specific details to the BESInfo object

Parameters
info

Reimplemented from BESError.

Definition at line 14 of file HttpError.cc.

◆ curl_code()

CURLcode http::HttpError::curl_code ( ) const
inline

Definition at line 94 of file HttpError.h.

◆ dump() [1/2]

std::string http::HttpError::dump ( ) const

Returns a string describing this object and its state.

Returns

Definition at line 28 of file HttpError.cc.

◆ dump() [2/2]

void http::HttpError::dump ( std::ostream & strm) const
inlineoverridevirtual

dumps information about this object

Displays the pointer value of this instance along with the exception message, the file from which the exception was generated, and the line number in that file.

Parameters
strmC++ i/o stream to dump the information to

Reimplemented from BESError.

Definition at line 118 of file HttpError.h.

◆ error_name()

std::string http::HttpError::error_name ( ) const
inlineoverridevirtual

Reimplemented from BESError.

Definition at line 122 of file HttpError.h.

◆ get_bes_error_type()

unsigned int BESError::get_bes_error_type ( ) const
inlineinherited

Return the return code for this error class.

Returns the return code for this error class, which could represent the need to terminate or do something specific base on the error

Returns
context string

Definition at line 174 of file BESError.h.

◆ get_file()

std::string BESError::get_file ( ) const
inlineinherited

get the file name where the exception was thrown

Returns
file name

Definition at line 140 of file BESError.h.

◆ get_line()

unsigned int BESError::get_line ( ) const
inlineinherited

get the line number where the exception was thrown

Returns
line number

Definition at line 148 of file BESError.h.

◆ get_message()

std::string BESError::get_message ( ) const
inlineinherited

get the error message for this exception

Returns
error message

Definition at line 132 of file BESError.h.

◆ get_verbose_message()

string BESError::get_verbose_message ( ) const
virtualinherited

Definition at line 43 of file BESError.cc.

◆ http_status()

long http::HttpError::http_status ( ) const
inline

Definition at line 96 of file HttpError.h.

◆ origin_url()

std::string http::HttpError::origin_url ( ) const
inline

Definition at line 90 of file HttpError.h.

◆ redirect_url()

std::string http::HttpError::redirect_url ( ) const
inline

Definition at line 92 of file HttpError.h.

◆ response_body()

std::string http::HttpError::response_body ( ) const
inline

Definition at line 100 of file HttpError.h.

◆ response_headers()

std::vector< std::string > http::HttpError::response_headers ( ) const
inline

Definition at line 98 of file HttpError.h.

◆ set_bes_error_type()

void BESError::set_bes_error_type ( unsigned int type)
inlineinherited

Set the return code for this particular error class.

Sets the return code for this error class, which could represent the need to terminate or do something specific based on the error.

Parameters
typethe type of error this error object represents. Can be one of BES_INTERNAL_ERROR, BES_INTERNAL_FATAL_ERROR, BES_SYNTAX_USER_ERROR, BES_FORBIDDEN_ERROR, BES_NOT_FOUND_ERROR

Definition at line 164 of file BESError.h.

◆ set_message()

void BESError::set_message ( const std::string & msg)
inlineinherited

set the error message for this exception

Parameters
msgmessage string

Definition at line 108 of file BESError.h.

◆ what()

const char * BESError::what ( ) const
inlineoverridenoexceptinherited

Return a brief message about the exception.

Returns
A char* that points to the message and is valid for the lifetime of this instance.

Definition at line 184 of file BESError.h.


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