MCPcopy Create free account
hub / github.com/apache/trafficserver / Error

Class Error

include/cripts/Error.hpp:31–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29class Context;
30
31class Error
32{
33public:
34 class Reason
35 {
36 using self_type = Reason;
37
38 public:
39 Reason() = default;
40 Reason(const self_type &) = delete;
41 void operator=(const self_type &) = delete;
42
43 static void _set(cripts::Context *context, const cripts::string_view msg);
44
45 private:
46 friend class Error;
47
48 [[nodiscard]] cripts::string_view
49 _getter() const
50 {
51 return {_reason.c_str(), _reason.size()};
52 }
53
54 void
55 _setter(const cripts::string_view msg)
56 {
57 _reason = msg;
58 }
59
60 cripts::string _reason;
61 };
62
63#undef Status
64#undef Error
65 class Status
66 {
67 using self_type = Status;
68
69 public:
70 Status() = default;
71 Status(const self_type &) = delete;
72 void operator=(const self_type &) = delete;
73
74 static void _set(cripts::Context *context, TSHttpStatus status, const cripts::string_view msg = {});
75
76 static void
77 _set(cripts::Context *context, int status, const cripts::string_view msg = {})
78 {
79 _set(context, static_cast<TSHttpStatus>(status), msg);
80 }
81
82 static TSHttpStatus _get(cripts::Context *context);
83
84 private:
85 friend class Error;
86
87 [[nodiscard]] TSHttpStatus
88 _getter() const

Callers 15

persist_bad_disksFunction · 0.50
ink_cache_initFunction · 0.50
openReadStartEarliestMethod · 0.50
BuildTableMethod · 0.50
read_config_fileMethod · 0.50
read_configMethod · 0.50
handleReadDoneMethod · 0.50
open_conMethod · 0.50
get_query_idMethod · 0.50
parse_buffer_chunk_sizesFunction · 0.50
setMethod · 0.50
do_alloc_stackMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected