a transaction problem More...

#include <Error.h>

Collaboration diagram for Error:

Public Member Functions

 Error ()=default
 Error (const err_type c)
 support implicit conversions More...
 Error (const err_type c, const ErrorDetailPointer &d)
 operator bool () const
void update (const Error &)
 if necessary, stores the given error information (if any) More...
void update (err_type, const ErrorDetailPointer &)
void update (err_type)
void update (const ErrorDetailPointer &detail)
void clear ()
 switch to the default "no error information" state More...

Public Attributes

err_type category = ERR_NONE
 primary error classification (or ERR_NONE) More...
ErrorDetails details

Detailed Description

Definition at line 27 of file Error.h.

Constructor & Destructor Documentation

◆ Error() [1/3]

Error::Error ( )

Referenced by clear().

◆ Error() [2/3]

Error::Error ( const err_type  c)

Definition at line 30 of file Error.h.

◆ Error() [3/3]

Error::Error ( const err_type  c,
const ErrorDetailPointer d 

Definition at line 31 of file Error.h.

References update().

Member Function Documentation

◆ clear()

void Error::clear ( )

Definition at line 53 of file Error.h.

References Error().

Referenced by ConnStateData::add(), HttpRequest::clearError(), and HttpRequest::init().

◆ operator bool()

Error::operator bool ( ) const

Definition at line 33 of file Error.h.

References category, and ERR_NONE.

◆ update() [1/4]

◆ update() [2/4]

void Error::update ( const ErrorDetailPointer detail)

records an additional error detail (if any), leaving category unchanged more convenient and faster alternative to calling update(Error(ERR_NONE, d))

detaileither nil or a pointer to a new or an already known detail

Definition at line 35 of file Error.cc.

References debugs, details, and ErrorDetail::equals().

◆ update() [3/4]

void Error::update ( err_type  recentCategory)

if necessary, stores the given error category (if any), leaving details unchanged; the first non-ERR_NONE category wins; more convenient alternative to calling update(Error(c))

Definition at line 17 of file Error.cc.

References category, debugs, ERR_NONE, and errorTypeName().

◆ update() [4/4]

void Error::update ( err_type  recentCategory,
const ErrorDetailPointer recentDetail 

if necessary, stores the given error information (if any); more convenient and faster alternative to calling update(Error(c, d))

Definition at line 61 of file Error.cc.

References update().

Member Data Documentation

◆ category

◆ details

ErrorDetails Error::details

Zero or more details of a single error, in temporal order of discovery without duplicates or nil pointers. The order/timing of update() calls is used to approximate detail discovery time.

Definition at line 60 of file Error.h.

Referenced by update(), and Ftp::Server::writeErrorReply().

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






Web Site Translations