system call failure detail based on standard errno(3)/strerror(3) APIs More...

#include <SysErrorDetail.h>

Inheritance diagram for SysErrorDetail:
Collaboration diagram for SysErrorDetail:

Public Types

using Pointer = ErrorDetailPointer
 

Public Member Functions

SBuf brief () const override
 
SBuf verbose (const HttpRequestPointer &) const override
 
bool equals (const ErrorDetail &other) const
 

Static Public Member Functions

static ErrorDetail::Pointer NewIfAny (const int errorNo)
 
static SBuf Brief (int errorNo)
 

Private Member Functions

 MEMPROXY_CLASS (SysErrorDetail)
 
 SysErrorDetail (const int anErrorNo)
 

Private Attributes

int errorNo
 errno(3) set by the last failed system call or equivalent More...
 

Detailed Description

Definition at line 16 of file SysErrorDetail.h.

Member Typedef Documentation

◆ Pointer

Definition at line 23 of file Detail.h.

Constructor & Destructor Documentation

◆ SysErrorDetail()

SysErrorDetail::SysErrorDetail ( const int  anErrorNo)
inlineexplicitprivate

Definition at line 37 of file SysErrorDetail.h.

Referenced by Brief(), and NewIfAny().

Member Function Documentation

◆ brief()

SBuf SysErrorDetail::brief ( ) const
overridevirtual
Returns
a single "token" summarizing available details suitable as an access.log field and similar output processed by programs

Implements ErrorDetail.

Definition at line 21 of file SysErrorDetail.cc.

References errorNo, and ToSBuf().

◆ Brief()

SBuf SysErrorDetail::Brief ( int  errorNo)
static
Returns
a single "token" summarizing available details suitable as an access.log field and similar output processed by programs

Definition at line 15 of file SysErrorDetail.cc.

References SysErrorDetail(), and errorNo.

Referenced by Security::ErrorDetail::brief().

◆ equals()

bool ErrorDetail::equals ( const ErrorDetail other) const
inlineinherited

Definition at line 44 of file Detail.h.

Referenced by Error::update().

◆ MEMPROXY_CLASS()

SysErrorDetail::MEMPROXY_CLASS ( SysErrorDetail  )
private

◆ NewIfAny()

static ErrorDetail::Pointer SysErrorDetail::NewIfAny ( const int  errorNo)
inlinestatic
Returns
a pointer to a SysErrorDetail instance (or nil for lost errnos)

Definition at line 22 of file SysErrorDetail.h.

References SysErrorDetail(), and errorNo.

Referenced by ErrorState::BuildHttpReply(), Server::doClientRead(), Ftp::Client::failed(), and Ftp::Relay::failedErrorMessage().

◆ verbose()

SBuf SysErrorDetail::verbose ( const HttpRequestPointer ) const
overridevirtual
Returns
all available details; may be customized for the given request suitable for error pages and other output meant for human consumption

Implements ErrorDetail.

Definition at line 27 of file SysErrorDetail.cc.

References errorNo, and xstrerr().

Member Data Documentation

◆ errorNo

int SysErrorDetail::errorNo
private

Definition at line 39 of file SysErrorDetail.h.

Referenced by brief(), Brief(), NewIfAny(), and verbose().


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors