ExceptionErrorDetail.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
3 *
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
7 */
8
9#ifndef _SQUID_SRC_ERROR_EXCEPTIONERRORDETAIL_H
10#define _SQUID_SRC_ERROR_EXCEPTIONERRORDETAIL_H
11
12#include "error/Detail.h"
13#include "sbuf/SBuf.h"
14#include "sbuf/Stream.h"
15
17#define SQUID_EXCEPTION_START_BASE 110000
18
22{
24
25public:
27
28 /* ErrorDetail API */
29 SBuf brief() const override {
30 return ToSBuf("exception=", std::hex, exceptionId);
31 }
32
33 SBuf verbose(const HttpRequestPointer &) const override {
34 return ToSBuf("Exception (ID=", std::hex, exceptionId, ')');
35 }
36
37private:
39};
40
41#endif /* _SQUID_SRC_ERROR_EXCEPTIONERRORDETAIL_H */
42
#define SQUID_EXCEPTION_START_BASE
offset for exception ID details, for backward compatibility
uint32_t SourceLocationId
semi-uniquely identifies a source code location; stable across Squid runs
Definition: Here.h:18
interface for supplying additional information about a transaction failure
Definition: Detail.h:21
SBuf verbose(const HttpRequestPointer &) const override
SourceLocationId exceptionId
identifies the thrower or catcher
SBuf brief() const override
MEMPROXY_CLASS(ExceptionErrorDetail)
ExceptionErrorDetail(const SourceLocationId id)
Definition: SBuf.h:94
SBuf ToSBuf(Args &&... args)
slowly stream-prints all arguments into a freshly allocated SBuf
Definition: Stream.h:63

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors