mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Review usage of Reporter::InternalError, addresses BIT-1045.
Replaced some with InternalWarning or InternalAnalyzerError, the later being a new method which signals the analyzer to not process further input. Some usages I just removed if they didn't make sense or clearly couldn't happen. Also did some minor refactors of related code while reviewing/exploring ways to get rid of InternalError usages. Also, for TCP content file write failures there's a new event: "contents_file_write_failure".
This commit is contained in:
parent
6734260136
commit
b828a6ddc7
51 changed files with 532 additions and 267 deletions
|
@ -362,12 +362,19 @@ Analyzer* Manager::InstantiateAnalyzer(Tag tag, RecordVal* args, File* f) const
|
|||
Component* c = Lookup(tag);
|
||||
|
||||
if ( ! c )
|
||||
reporter->InternalError("cannot instantiate unknown file analyzer: %s",
|
||||
tag.AsString().c_str());
|
||||
{
|
||||
reporter->InternalWarning(
|
||||
"unknown file analyzer instantiation request: %s",
|
||||
tag.AsString().c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ( ! c->Factory() )
|
||||
reporter->InternalError("file analyzer %s cannot be instantiated "
|
||||
{
|
||||
reporter->InternalWarning("file analyzer %s cannot be instantiated "
|
||||
"dynamically", c->CanonicalName());
|
||||
return 0;
|
||||
}
|
||||
|
||||
return c->Factory()(args, f);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue