Improve the error when you change the TimeConverter
We were exploding with a miss-matched UUID error when the problem was
that the time converter changed. Instead, print out a more useful
error which is easier to fix.
Change-Id: Ie233e34f5de93d332d46e9e095231e2454431cd5
Signed-off-by: Austin Schuh <austin.linux@gmail.com>
diff --git a/aos/events/simulated_event_loop.cc b/aos/events/simulated_event_loop.cc
index 9121a8f..11e10a6 100644
--- a/aos/events/simulated_event_loop.cc
+++ b/aos/events/simulated_event_loop.cc
@@ -1275,7 +1275,10 @@
scheduler_.ScheduleOnStartup([this]() {
UUID next_uuid = scheduler_.boot_uuid();
if (boot_uuid_ != next_uuid) {
- CHECK_EQ(boot_uuid_, UUID::Zero());
+ CHECK_EQ(boot_uuid_, UUID::Zero())
+ << ": Boot UUID changed without restarting. Did TimeConverter "
+ "change the boot UUID without signaling a restart, or did you "
+ "change TimeConverter?";
boot_uuid_ = next_uuid;
}
VLOG(1) << scheduler_.distributed_now() << " " << NodeName(this->node())