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 "base/IoManip.h"
13 #include "error/Detail.h"
14 #include "sbuf/SBuf.h"
15 #include "sbuf/Stream.h"
16 
18 #define SQUID_EXCEPTION_START_BASE 110000
19 
23 {
25 
26 public:
28 
29  /* ErrorDetail API */
30  SBuf brief() const override {
31  return ToSBuf("exception=", asHex(exceptionId));
32  }
33 
34  SBuf verbose(const HttpRequestPointer &) const override {
35  return ToSBuf("Exception (ID=", asHex(exceptionId), ')');
36  }
37 
38 private:
40 };
41 
42 #endif /* SQUID_SRC_ERROR_EXCEPTIONERRORDETAIL_H */
43 
Definition: SBuf.h:93
MEMPROXY_CLASS(ExceptionErrorDetail)
AsHex< Integer > asHex(const Integer n)
a helper to ease AsHex object creation
Definition: IoManip.h:169
uint32_t SourceLocationId
semi-uniquely identifies a source code location; stable across Squid runs
Definition: Here.h:18
ExceptionErrorDetail(const SourceLocationId id)
#define SQUID_EXCEPTION_START_BASE
offset for exception ID details, for backward compatibility
SourceLocationId exceptionId
identifies the thrower or catcher
SBuf verbose(const HttpRequestPointer &) const override
SBuf brief() const override
SBuf ToSBuf(Args &&... args)
slowly stream-prints all arguments into a freshly allocated SBuf
Definition: Stream.h:63
interface for supplying additional information about a transaction failure
Definition: Detail.h:20

 

Introduction

Documentation

Support

Miscellaneous