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
|
@ -20,7 +20,10 @@ void* PrefixTable::Insert(const IPAddr& addr, int width, void* data)
|
|||
Deref_Prefix(prefix);
|
||||
|
||||
if ( ! node )
|
||||
reporter->InternalError("Cannot create node in patricia tree");
|
||||
{
|
||||
reporter->InternalWarning("Cannot create node in patricia tree");
|
||||
return 0;
|
||||
}
|
||||
|
||||
void* old = node->data;
|
||||
|
||||
|
@ -49,7 +52,7 @@ void* PrefixTable::Insert(const Val* value, void* data)
|
|||
break;
|
||||
|
||||
default:
|
||||
reporter->InternalError("Wrong index type for PrefixTable");
|
||||
reporter->InternalWarning("Wrong index type for PrefixTable");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -83,8 +86,8 @@ void* PrefixTable::Lookup(const Val* value, bool exact) const
|
|||
break;
|
||||
|
||||
default:
|
||||
reporter->InternalError("Wrong index type %d for PrefixTable",
|
||||
value->Type()->Tag());
|
||||
reporter->InternalWarning("Wrong index type %d for PrefixTable",
|
||||
value->Type()->Tag());
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -122,7 +125,7 @@ void* PrefixTable::Remove(const Val* value)
|
|||
break;
|
||||
|
||||
default:
|
||||
reporter->InternalError("Wrong index type for PrefixTable");
|
||||
reporter->InternalWarning("Wrong index type for PrefixTable");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue