#undef __BT_FUNC_STATUS_INVALID_PARAMS
#undef __BT_FUNC_STATUS_INVALID_OBJECT
#undef __BT_FUNC_STATUS_MEMORY_ERROR
-#undef __BT_FUNC_STATUS_LOADING_ERROR
#undef __BT_FUNC_STATUS_ERROR
#undef __BT_FUNC_STATUS_OK
#undef __BT_FUNC_STATUS_END
# define __BT_FUNC_STATUS_MEMORY_ERROR -12
#endif
-/* Plugin loading error */
-#ifndef __BT_FUNC_STATUS_LOADING_ERROR
-# define __BT_FUNC_STATUS_LOADING_ERROR -2
-#endif
-
/* General error */
#ifndef __BT_FUNC_STATUS_ERROR
# define __BT_FUNC_STATUS_ERROR -1
BT_PLUGIN_FIND_STATUS_OK = __BT_FUNC_STATUS_OK,
BT_PLUGIN_FIND_STATUS_NOT_FOUND = __BT_FUNC_STATUS_NOT_FOUND,
BT_PLUGIN_FIND_STATUS_ERROR = __BT_FUNC_STATUS_ERROR,
- BT_PLUGIN_FIND_STATUS_LOADING_ERROR = __BT_FUNC_STATUS_LOADING_ERROR,
BT_PLUGIN_FIND_STATUS_MEMORY_ERROR = __BT_FUNC_STATUS_MEMORY_ERROR,
} bt_plugin_find_status;
BT_PLUGIN_FIND_ALL_FROM_FILE_STATUS_OK = __BT_FUNC_STATUS_OK,
BT_PLUGIN_FIND_ALL_FROM_FILE_STATUS_NOT_FOUND = __BT_FUNC_STATUS_NOT_FOUND,
BT_PLUGIN_FIND_ALL_FROM_FILE_STATUS_ERROR = __BT_FUNC_STATUS_ERROR,
- BT_PLUGIN_FIND_ALL_FROM_FILE_STATUS_LOADING_ERROR = __BT_FUNC_STATUS_LOADING_ERROR,
BT_PLUGIN_FIND_ALL_FROM_FILE_STATUS_MEMORY_ERROR = __BT_FUNC_STATUS_MEMORY_ERROR,
} bt_plugin_find_all_from_file_status;
BT_PLUGIN_FIND_ALL_FROM_DIR_STATUS_OK = __BT_FUNC_STATUS_OK,
BT_PLUGIN_FIND_ALL_FROM_DIR_STATUS_NOT_FOUND = __BT_FUNC_STATUS_NOT_FOUND,
BT_PLUGIN_FIND_ALL_FROM_DIR_STATUS_ERROR = __BT_FUNC_STATUS_ERROR,
- BT_PLUGIN_FIND_ALL_FROM_DIR_STATUS_LOADING_ERROR = __BT_FUNC_STATUS_LOADING_ERROR,
BT_PLUGIN_FIND_ALL_FROM_DIR_STATUS_MEMORY_ERROR = __BT_FUNC_STATUS_MEMORY_ERROR,
} bt_plugin_find_all_from_dir_status;
BT_PLUGIN_FIND_ALL_FROM_STATIC_STATUS_OK = __BT_FUNC_STATUS_OK,
BT_PLUGIN_FIND_ALL_FROM_STATIC_STATUS_NOT_FOUND = __BT_FUNC_STATUS_NOT_FOUND,
BT_PLUGIN_FIND_ALL_FROM_STATIC_STATUS_ERROR = __BT_FUNC_STATUS_ERROR,
- BT_PLUGIN_FIND_ALL_FROM_STATIC_STATUS_LOADING_ERROR = __BT_FUNC_STATUS_LOADING_ERROR,
BT_PLUGIN_FIND_ALL_FROM_STATIC_STATUS_MEMORY_ERROR = __BT_FUNC_STATUS_MEMORY_ERROR,
} bt_plugin_find_all_from_static_status;
pass
-class _LoadingError(_Error):
- pass
-
-
class _ListenerHandle:
def __init__(self, listener_id, obj):
self._listener_id = listener_id
raise bt2.Canceled
else:
raise bt2.Canceled(msg)
- elif status == native_bt.__BT_FUNC_STATUS_LOADING_ERROR:
- if msg is None:
- raise bt2._LoadingError
- else:
- raise bt2._LoadingError(msg)
elif status == native_bt.__BT_FUNC_STATUS_OVERFLOW:
if msg is None:
raise bt2.OverflowError
return "INVALID_OBJECT";
case __BT_FUNC_STATUS_MEMORY_ERROR:
return "MEMORY_ERROR";
- case __BT_FUNC_STATUS_LOADING_ERROR:
- return "LOADING_ERROR";
case __BT_FUNC_STATUS_ERROR:
return "ERROR";
case __BT_FUNC_STATUS_OK:
#define BT_FUNC_STATUS_INVALID_PARAMS __BT_FUNC_STATUS_INVALID_PARAMS
#define BT_FUNC_STATUS_INVALID_OBJECT __BT_FUNC_STATUS_INVALID_OBJECT
#define BT_FUNC_STATUS_MEMORY_ERROR __BT_FUNC_STATUS_MEMORY_ERROR
-#define BT_FUNC_STATUS_LOADING_ERROR __BT_FUNC_STATUS_LOADING_ERROR
#define BT_FUNC_STATUS_ERROR __BT_FUNC_STATUS_ERROR
#define BT_FUNC_STATUS_OK __BT_FUNC_STATUS_OK
#define BT_FUNC_STATUS_END __BT_FUNC_STATUS_END
NULL,
descriptor->name, cur_attr->type_name,
cur_attr->type);
- status = BT_FUNC_STATUS_LOADING_ERROR;
+ status = BT_FUNC_STATUS_ERROR;
goto end;
} else {
BT_LIB_LOGW(
cur_cc_descr_attr->comp_class_descriptor->type),
cur_cc_descr_attr->type_name,
cur_cc_descr_attr->type);
- status = BT_FUNC_STATUS_LOADING_ERROR;
+ status = BT_FUNC_STATUS_ERROR;
goto end;
} else {
BT_LIB_LOGW(
descriptor->name,
cc_full_descr->descriptor->name,
cc_full_descr->descriptor->type);
- status = BT_FUNC_STATUS_LOADING_ERROR;
+ status = BT_FUNC_STATUS_ERROR;
goto end;
} else {
BT_LIB_LOGW(
BT_LIB_LOGW_APPEND_CAUSE(
"Unknown ABI major version: abi-major=%d",
descriptor->major);
- status = BT_FUNC_STATUS_LOADING_ERROR;
+ status = BT_FUNC_STATUS_ERROR;
goto error;
} else {
BT_LIB_LOGW(
"Cannot resolve plugin symbol: path=\"%s\", "
"symbol=\"%s\"", path,
"__bt_get_end_section_plugin_descriptors");
- status = BT_FUNC_STATUS_LOADING_ERROR;
+ status = BT_FUNC_STATUS_ERROR;
} else {
BT_LIB_LOGW(
"Cannot resolve plugin symbol: path=\"%s\", "
path, "__bt_get_begin_section_plugin_descriptor_attributes",
"__bt_get_end_section_plugin_descriptor_attributes",
attrs_begin, attrs_end);
- status = BT_FUNC_STATUS_LOADING_ERROR;
+ status = BT_FUNC_STATUS_ERROR;
} else {
BT_LIB_LOGW(
"Found section start or end symbol, but not both: "
path, "__bt_get_begin_section_component_class_descriptors",
"__bt_get_end_section_component_class_descriptors",
cc_descriptors_begin, cc_descriptors_end);
- status = BT_FUNC_STATUS_LOADING_ERROR;
+ status = BT_FUNC_STATUS_ERROR;
} else {
BT_LIB_LOGW(
"Found section start or end symbol, but not both: "
path, "__bt_get_begin_section_component_class_descriptor_attributes",
"__bt_get_end_section_component_class_descriptor_attributes",
cc_descr_attrs_begin, cc_descr_attrs_end);
- status = BT_FUNC_STATUS_LOADING_ERROR;
+ status = BT_FUNC_STATUS_ERROR;
} else {
BT_LIB_LOGW(
"Found section start or end symbol, but not both: "
BT_LIB_LOGW_APPEND_CAUSE(
"Cannot find `name` attribute in Python plugin info object: "
"py-plugin-info-addr=%p", plugin_info);
- status = BT_FUNC_STATUS_LOADING_ERROR;
+ status = BT_FUNC_STATUS_ERROR;
} else {
BT_LIB_LOGW(
"Cannot find `name` attribute in Python plugin info object: "
BT_LIB_LOGW_APPEND_CAUSE(
"Cannot find `author` attribute in Python plugin info object: "
"py-plugin-info-addr=%p", plugin_info);
- status = BT_FUNC_STATUS_LOADING_ERROR;
+ status = BT_FUNC_STATUS_ERROR;
} else {
BT_LIB_LOGW(
"Cannot find `author` attribute in Python plugin info object: "
BT_LIB_LOGW_APPEND_CAUSE(
"Cannot find `description` attribute in Python plugin info object: "
"py-plugin-info-addr=%p", plugin_info);
- status = BT_FUNC_STATUS_LOADING_ERROR;
+ status = BT_FUNC_STATUS_ERROR;
} else {
BT_LIB_LOGW(
"Cannot find `description` attribute in Python plugin info object: "
BT_LIB_LOGW_APPEND_CAUSE(
"Cannot find `license` attribute in Python plugin info object: "
"py-plugin-info-addr=%p", plugin_info);
- status = BT_FUNC_STATUS_LOADING_ERROR;
+ status = BT_FUNC_STATUS_ERROR;
} else {
BT_LIB_LOGW(
"Cannot find `license` attribute in Python plugin info object: "
BT_LIB_LOGW_APPEND_CAUSE(
"Cannot find `version` attribute in Python plugin info object: "
"py-plugin-info-addr=%p", plugin_info);
- status = BT_FUNC_STATUS_LOADING_ERROR;
+ status = BT_FUNC_STATUS_ERROR;
} else {
BT_LIB_LOGW(
"Cannot find `version` attribute in Python plugin info object: "
BT_LIB_LOGW_APPEND_CAUSE(
"Cannot find `comp_class_addrs` attribute in Python plugin info object: "
"py-plugin-info-addr=%p", plugin_info);
- status = BT_FUNC_STATUS_LOADING_ERROR;
+ status = BT_FUNC_STATUS_ERROR;
} else {
BT_LIB_LOGW(
"Cannot find `comp_class_addrs` attribute in Python plugin info object: "
BT_LIB_LOGW_APPEND_CAUSE(
"Cannot decode Python plugin name string: "
"py-plugin-info-addr=%p", plugin_info);
- status = BT_FUNC_STATUS_LOADING_ERROR;
+ status = BT_FUNC_STATUS_ERROR;
} else {
BT_LIB_LOGW(
"Cannot decode Python plugin name string: "
BT_LIB_LOGW_APPEND_CAUSE(
"Plugin name is not a string: "
"py-plugin-info-addr=%p", plugin_info);
- status = BT_FUNC_STATUS_LOADING_ERROR;
+ status = BT_FUNC_STATUS_ERROR;
} else {
BT_LIB_LOGW(
"Plugin name is not a string: "
BT_LIB_LOGW_APPEND_CAUSE(
"Cannot decode Python plugin author string: "
"py-plugin-info-addr=%p", plugin_info);
- status = BT_FUNC_STATUS_LOADING_ERROR;
+ status = BT_FUNC_STATUS_ERROR;
} else {
BT_LIB_LOGW(
"Cannot decode Python plugin author string: "
BT_LIB_LOGW_APPEND_CAUSE(
"Cannot decode Python plugin description string: "
"py-plugin-info-addr=%p", plugin_info);
- status = BT_FUNC_STATUS_LOADING_ERROR;
+ status = BT_FUNC_STATUS_ERROR;
} else {
BT_LIB_LOGW(
"Cannot decode Python plugin description string: "
BT_LIB_LOGW_APPEND_CAUSE(
"Cannot decode Python plugin license string: "
"py-plugin-info-addr=%p", plugin_info);
- status = BT_FUNC_STATUS_LOADING_ERROR;
+ status = BT_FUNC_STATUS_ERROR;
} else {
BT_LIB_LOGW(
"Cannot decode Python plugin license string: "
BT_LIB_LOGW_APPEND_CAUSE(
"Invalid Python plugin version format: "
"py-plugin-info-addr=%p", plugin_info);
- status = BT_FUNC_STATUS_LOADING_ERROR;
+ status = BT_FUNC_STATUS_ERROR;
} else {
BT_LIB_LOGW(
"Invalid Python plugin version format: "
BT_LIB_LOGW_APPEND_CAUSE(
"Cannot decode Python plugin version's extra string: "
"py-plugin-info-addr=%p", plugin_info);
- status = BT_FUNC_STATUS_LOADING_ERROR;
+ status = BT_FUNC_STATUS_ERROR;
} else {
BT_LIB_LOGW(
"Cannot decode Python plugin version's extra string: "
"Component class address is not an integer in Python plugin info object: "
"py-plugin-info-addr=%p, index=%zu",
plugin_info, i);
- status = BT_FUNC_STATUS_LOADING_ERROR;
+ status = BT_FUNC_STATUS_ERROR;
} else {
BT_LIB_LOGW(
"Component class address is not an integer in Python plugin info object: "
append_python_traceback_error_cause();
BT_LIB_LOGW_APPEND_CAUSE(
"Cannot load Python plugin: path=\"%s\"", path);
- status = BT_FUNC_STATUS_LOADING_ERROR;
+ status = BT_FUNC_STATUS_ERROR;
} else {
BT_LIB_LOGW(
"Cannot load Python plugin: path=\"%s\"", path);