Add the name of channel receiving bad data
When the InputReceiver gets bad data from the other end of the channel, we currently don't print the channel information. As a result, when this crash happens, we only learn about the process name. Add the channel info to this crash so that it's more useful going forward.
Bug: 329059530
Change-Id: Iad4c892dee37a9bf35e790781a2c39431d5a146a
Test: presubmit
diff --git a/libs/input/InputConsumer.cpp b/libs/input/InputConsumer.cpp
index e0d874e..41ecfe3 100644
--- a/libs/input/InputConsumer.cpp
+++ b/libs/input/InputConsumer.cpp
@@ -325,9 +325,10 @@
case InputMessage::Type::FINISHED:
case InputMessage::Type::TIMELINE: {
- LOG_ALWAYS_FATAL("Consumed a %s message, which should never be seen by "
- "InputConsumer!",
- ftl::enum_string(mMsg.header.type).c_str());
+ LOG(FATAL) << "Consumed a " << ftl::enum_string(mMsg.header.type)
+ << " message, which should never be seen by "
+ "InputConsumer on "
+ << mChannel->getName();
break;
}