mirror of
https://github.com/zeek/zeek.git
synced 2025-10-14 12:38:20 +00:00
Input: Further small changes to error handling
Calling Error() in an input reader now automatically will disable the reader and return a failure in the Update/Heartbeat calls. Also adds more tests. Addresses BIT-1181
This commit is contained in:
parent
6b9abe85a7
commit
c8e1a39758
7 changed files with 89 additions and 7 deletions
|
@ -191,6 +191,16 @@ public:
|
|||
|
||||
void Info(const char* msg) override;
|
||||
void Warning(const char* msg) override;
|
||||
|
||||
/**
|
||||
* Reports an error in the child thread. For input readers, it is assumed,
|
||||
* that Info and Warnings do not cause the read operation to fail (they might
|
||||
* signal that, e.g., a single line was ignored).
|
||||
*
|
||||
* It is assumed that Errors are not recoverable. Calling the Error function
|
||||
* will return the error back to scriptland and also *automatically* causes
|
||||
* the current reader to be disabled and torn down.
|
||||
*/
|
||||
void Error(const char* msg) override;
|
||||
|
||||
protected:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue