mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Broker: Fix some error messages
This commit is contained in:
parent
a233b50be1
commit
91a8fd0c63
1 changed files with 3 additions and 2 deletions
|
@ -873,7 +873,8 @@ zeek::RecordValPtr Manager::MakeEvent(ArgsSpan args, zeek::detail::Frame* frame)
|
||||||
// Event val must come first.
|
// Event val must come first.
|
||||||
|
|
||||||
if ( arg_val->GetType()->Tag() != TYPE_FUNC ) {
|
if ( arg_val->GetType()->Tag() != TYPE_FUNC ) {
|
||||||
Error("attempt to convert non-event into an event type");
|
Error("attempt to convert non-event into an event type (%s)",
|
||||||
|
zeek::obj_desc_short(arg_val.get()).c_str());
|
||||||
return rval;
|
return rval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -887,7 +888,7 @@ zeek::RecordValPtr Manager::MakeEvent(ArgsSpan args, zeek::detail::Frame* frame)
|
||||||
auto num_args = static_cast<size_t>(func->GetType()->Params()->NumFields());
|
auto num_args = static_cast<size_t>(func->GetType()->Params()->NumFields());
|
||||||
|
|
||||||
if ( num_args != args.size() - 1 ) {
|
if ( num_args != args.size() - 1 ) {
|
||||||
Error("bad # of arguments: got %zu, expect %zu", args.size() - 1, num_args + 1);
|
Error("bad # of arguments: got %zu, expect %zu", args.size() - 1, num_args);
|
||||||
return rval;
|
return rval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue