mirror of
https://github.com/zeek/zeek.git
synced 2025-10-15 13:08:20 +00:00
Preserve string output of Broker errors
This commit is contained in:
parent
cf2b5f7e05
commit
38aba87e41
1 changed files with 14 additions and 1 deletions
|
@ -1499,7 +1499,20 @@ void Manager::ProcessError(broker::error err)
|
||||||
ec = BifEnum::Broker::ErrorCode::UNSPECIFIED;
|
ec = BifEnum::Broker::ErrorCode::UNSPECIFIED;
|
||||||
}
|
}
|
||||||
|
|
||||||
msg = caf::to_string(err.context());
|
// Note: we could also use to_string, but that change the log output
|
||||||
|
// and we would have to update all baselines relying on this format.
|
||||||
|
if ( auto mv = caf::make_const_typed_message_view<broker::endpoint_info, std::string>(err.context()) )
|
||||||
|
{
|
||||||
|
msg += '(';
|
||||||
|
msg += to_string(get<0>(mv).node);
|
||||||
|
msg += ", ";
|
||||||
|
msg += caf::deep_to_string(get<0>(mv).network);
|
||||||
|
msg += ", ";
|
||||||
|
msg += caf::deep_to_string(get<1>(mv));
|
||||||
|
msg += ')';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
msg = caf::to_string(err.context());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue