mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Return generic result for get operations that includes error messages
This commit is contained in:
parent
4695060d75
commit
f1a7376e0a
27 changed files with 83 additions and 53 deletions
|
@ -356,6 +356,14 @@ type ftp_port: record {
|
|||
valid: bool; ##< True if format was right. Only then are *h* and *p* valid.
|
||||
};
|
||||
|
||||
## A generic type for returning either a value or an error string from a
|
||||
## function or a BIF method. This is sort of equivalent to std::expected
|
||||
## in C++.
|
||||
type val_result: record {
|
||||
val: any &optional;
|
||||
error: string &optional;
|
||||
};
|
||||
|
||||
## Statistics about what a TCP endpoint sent.
|
||||
##
|
||||
## .. zeek:see:: conn_stats
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue