P4C
The P4 Compiler
Loading...
Searching...
No Matches
backends/tofino/bf-p4c/phv/error.h
1
18
19
#ifndef BF_P4C_PHV_ERROR_H_
20
#define BF_P4C_PHV_ERROR_H_
21
22
#include <sstream>
23
24
namespace
PHV
{
25
27
enum class
ErrorCode
{
28
ok = 0,
29
unknown,
30
// utils::is_well_formed
31
slicelist_sz_mismatch,
32
};
33
37
class
Error :
public
std::stringstream {
38
public
:
39
ErrorCode
code;
40
Error() : code(ErrorCode::ok) {}
41
void
set(
ErrorCode
c) { code = c; }
42
bool
is(
ErrorCode
c) {
return
code == c; }
43
};
44
45
}
// namespace PHV
46
47
#endif
/* BF_P4C_PHV_ERROR_H_ */
PHV
The namespace encapsulating PHV-related stuff.
Definition
gateway.h:32
PHV::ErrorCode
ErrorCode
ErrorCode is the specific reason of failure of function invoke.
Definition
backends/tofino/bf-p4c/phv/error.h:27
backends
tofino
bf-p4c
phv
error.h
Generated by
1.13.2