Make log_cat CHECK that we have the configuration
Instead of just segfaulting when we don't have it, inform the user and
point them in the right direction.
Change-Id: Ia74f64f4044fcb10e844626173a939459c1c99f9
Signed-off-by: Sanjay Narayanan <sanjay.narayanan@bluerivertech.com>
diff --git a/aos/events/logging/log_cat.cc b/aos/events/logging/log_cat.cc
index edd0ac7..5c69f07 100644
--- a/aos/events/logging/log_cat.cc
+++ b/aos/events/logging/log_cat.cc
@@ -155,6 +155,9 @@
.max_vector_size = static_cast<size_t>(
FLAGS_max_vector_size)})
<< std::endl;
+ CHECK(full_header->has_configuration())
+ << ": Missing configuration! You may want to provide the path to the "
+ "logged configuration file using the --raw_header flag.";
while (true) {
const aos::SizePrefixedFlatbufferSpan<aos::logger::MessageHeader> message(