ErrorDetail.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_SSL_ERROR_DETAIL_H
10#define _SQUID_SSL_ERROR_DETAIL_H
11
13
14#include <optional>
15
16// TODO: Remove Security::X wrappers and move the remaining configurable error
17// details (i.e. templates/error-details.txt) code to src/security/ErrorDetail.
18
19namespace Ssl
20{
26bool ParseErrorString(const char *name, Security::Errors &);
27
30GetErrorCode(const char *name)
31{
32 return Security::ErrorCodeFromName(name);
33}
34
37inline const char *
38GetErrorName(const Security::ErrorCode code, const bool prefixRawCode = false)
39{
40 return Security::ErrorNameFromCode(code, prefixRawCode);
41}
42
45std::optional<SBuf> GetErrorDescr(Security::ErrorCode);
46
48bool ErrorIsOptional(const char *name);
49
50}//namespace Ssl
51#endif
52
int ErrorCode
Squid-defined error code (<0), an error code returned by X.509 API, or zero.
Definition: forward.h:132
const char * ErrorNameFromCode(ErrorCode err, bool prefixRawCode=false)
Definition: ErrorDetail.cc:430
ErrorCode ErrorCodeFromName(const char *name)
Definition: ErrorDetail.cc:410
std::unordered_set< Security::ErrorCode > Errors
Definition: forward.h:163
Definition: Xaction.cc:40
bool ErrorIsOptional(const char *name)
Definition: ErrorDetail.cc:149
Security::ErrorCode GetErrorCode(const char *name)
The Security::ErrorCode code of the error described by "name".
Definition: ErrorDetail.h:30
bool ParseErrorString(const char *name, Security::Errors &)
Definition: ErrorDetail.cc:111
std::optional< SBuf > GetErrorDescr(Security::ErrorCode)
Definition: ErrorDetail.cc:159
const char * GetErrorName(const Security::ErrorCode code, const bool prefixRawCode=false)
Definition: ErrorDetail.h:38
int code
Definition: smb-errors.c:145

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors