bt2: fix error message in trace_class.py
[babeltrace.git] / src / bindings / python / bt2 / bt2 / trace_class.py
index 1d05dba9f67ccda08cc5963bfd59433374bbf79f..dc9439eb6aa424215d3ac883249699b115796852 100644 (file)
@@ -117,7 +117,7 @@ class _TraceClassConst(object._SharedObject, collections.abc.Mapping):
 
         if listener_handle._obj.addr != self.addr:
             raise ValueError(
-                'This trace class destruction listener does not match the trace object.'
+                'This trace class destruction listener does not match the trace class object.'
             )
 
         if listener_handle._listener_id is None:
@@ -190,6 +190,23 @@ class _TraceClass(_TraceClassConst):
         supports_discarded_packets=False,
         discarded_packets_have_default_clock_snapshots=False,
     ):
+        # Validate parameters before we create the object.
+        bt2_stream_class._StreamClass._validate_create_params(
+            name,
+            user_attributes,
+            packet_context_field_class,
+            event_common_context_field_class,
+            default_clock_class,
+            assigns_automatic_event_class_id,
+            assigns_automatic_stream_id,
+            supports_packets,
+            packets_have_beginning_default_clock_snapshot,
+            packets_have_end_default_clock_snapshot,
+            supports_discarded_events,
+            discarded_events_have_default_clock_snapshots,
+            supports_discarded_packets,
+            discarded_packets_have_default_clock_snapshots,
+        )
 
         if self.assigns_automatic_stream_class_id:
             if id is not None:
This page took 0.024577 seconds and 4 git commands to generate.