)
if cc_ptr is None:
- raise bt2.CreationError(
+ raise bt2._MemoryError(
"cannot create component class '{}'".format(class_name)
)
return self
def __call__(cls, *args, **kwargs):
- raise bt2.Error(
+ raise RuntimeError(
'cannot directly instantiate a user component from a Python module'
)
tc_ptr = native_bt.trace_class_create(ptr)
if tc_ptr is None:
- raise bt2.CreationError('could not create trace class')
+ raise bt2._MemoryError('could not create trace class')
tc = bt2._TraceClass._create_from_ptr(tc_ptr)
tc._assigns_automatic_stream_class_id = assigns_automatic_stream_class_id
cc_ptr = native_bt.clock_class_create(ptr)
if cc_ptr is None:
- raise bt2.CreationError('could not create clock class')
+ raise bt2._MemoryError('could not create clock class')
cc = bt2.clock_class._ClockClass._create_from_ptr(cc_ptr)