rts/Eventlog: More descriptive error message
authorBen Gamari <ben@smart-cactus.org>
Mon, 15 Apr 2019 21:07:24 +0000 (17:07 -0400)
committerBen Gamari <ben@smart-cactus.org>
Wed, 19 Jun 2019 01:41:21 +0000 (21:41 -0400)
rts/eventlog/EventLog.c

index 8c4542f..ef18f0e 100644 (file)
@@ -506,8 +506,10 @@ initEventLogging(const EventLogWriter *ev_writer)
     event_log_writer = ev_writer;
     initEventLogWriter();
 
-    if (sizeof(EventDesc) / sizeof(char*) != NUM_GHC_EVENT_TAGS) {
-        barf("EventDesc array has the wrong number of elements");
+    int num_descs = sizeof(EventDesc) / sizeof(char*);
+    if (num_descs != NUM_GHC_EVENT_TAGS) {
+        barf("EventDesc array has the wrong number of elements (%d, NUM_GHC_EVENT_TAGS=%d)",
+             num_descs, NUM_GHC_EVENT_TAGS);
     }
 
     /*