sink.text.pretty: abort on unknown field class type
[babeltrace.git] / src / plugins / text / pretty / print.c
index 61d79cdb9459d74dacf12fd945a6822ea47fdbf2..4c7e18337b5e459787ad2233080f1b4c8d1eea6a 100644 (file)
@@ -745,7 +745,7 @@ void print_enum_value_bit_flag_label_arrays(struct pretty_component *pretty)
  *
  * This function will set the count to the count of mapping labels that match
  * the value. If count == 0, the caller has nothing to do, if count > 0,
- * the label_array contains the labels to print and the caller is reponsible
+ * the label_array contains the labels to print and the caller is responsible
  * to call g_free on it once the values have been used.
  */
 static
@@ -835,7 +835,7 @@ end:
  *
  * This function will set the count to the count of mapping labels that match
  * the value. If count == 0, the caller has nothing to do, if count > 0,
- * the label_array contains the labels to print and the caller is reponsible
+ * the label_array contains the labels to print and the caller is responsible
  * to call g_free on it once the values have been used.
  */
 static
@@ -1311,11 +1311,9 @@ int print_field(struct pretty_component *pretty,
        } else if (bt_field_class_type_is(class_id,
                        BT_FIELD_CLASS_TYPE_DYNAMIC_ARRAY)) {
                return print_sequence(pretty, field, print_names);
-       } else {
-               // TODO: log instead
-               fprintf(pretty->err, "[error] Unknown type id: %d\n", (int) class_id);
-               return -1;
        }
+
+       bt_common_abort();
 }
 
 static
@@ -1440,7 +1438,6 @@ end:
        return ret;
 }
 
-BT_HIDDEN
 int pretty_print_event(struct pretty_component *pretty,
                const bt_message *event_msg)
 {
@@ -1599,7 +1596,6 @@ int print_discarded_elements_msg(struct pretty_component *pretty,
        return ret;
 }
 
-BT_HIDDEN
 int pretty_print_discarded_items(struct pretty_component *pretty,
                const bt_message *msg)
 {
@@ -1668,7 +1664,6 @@ int pretty_print_discarded_items(struct pretty_component *pretty,
        return 0;
 }
 
-BT_HIDDEN
 void pretty_print_init(void)
 {
        strcpy(color_name, bt_common_color_bold());
This page took 0.024497 seconds and 4 git commands to generate.