IPCCompiler: Don't silently ignore failure to encode IPC message

When message encoding failed for some reason, we'd just swallow the
error without saying a word, and carry on without sending anything.

This led to some very confusing situations.
This commit is contained in:
Andreas Kling 2024-12-17 19:13:52 +01:00 committed by Andreas Kling
commit 6737b8b065
Notes: github-actions[bot] 2024-12-19 15:50:49 +00:00

View file

@ -512,8 +512,7 @@ void do_message_for_proxy(SourceGenerator message_generator, Endpoint const& end
auto result = m_connection.template send_sync_but_allow_failure<Messages::@endpoint.name@::@message.pascal_name@>()~~~"); auto result = m_connection.template send_sync_but_allow_failure<Messages::@endpoint.name@::@message.pascal_name@>()~~~");
} else { } else {
message_generator.append(R"~~~( message_generator.append(R"~~~(
// FIXME: Handle post_message failures. MUST(m_connection.post_message(Messages::@endpoint.name@::@message.pascal_name@ { )~~~");
(void) m_connection.post_message(Messages::@endpoint.name@::@message.pascal_name@ { )~~~");
} }
for (size_t i = 0; i < parameters.size(); ++i) { for (size_t i = 0; i < parameters.size(); ++i) {
@ -555,7 +554,7 @@ void do_message_for_proxy(SourceGenerator message_generator, Endpoint const& end
return { };)~~~"); return { };)~~~");
} }
} else { } else {
message_generator.appendln(" });"); message_generator.appendln(" }));");
} }
message_generator.appendln(R"~~~( message_generator.appendln(R"~~~(