return;
}
+ conv_error_e conv_error;
_conv_service_callback_info* callback_info = it->second;
conv_service_h service_handle = new(std::nothrow) _conv_service_handle();
if (!channel.isEmpty()) {
channel_handle = new(std::nothrow) _conv_channel_handle();
- IF_FAIL_VOID_TAG(channel_handle, _E, "Memory allocation failed");
+ IF_FAIL_CATCH_TAG(channel_handle, _E, "Memory allocation failed");
channel_handle->jchannel = channel;
}
if (!payload.isEmpty() || binary_length > 0) {
payload_handle = new(std::nothrow) _conv_payload_handle();
- IF_FAIL_VOID_TAG(payload_handle, _E, "Memory allocation failed");
+ IF_FAIL_CATCH_TAG(payload_handle, _E, "Memory allocation failed");
payload_handle->jpayload = payload;
payload_handle->binary_length = binary_length;
payload_handle->binary = binary;
}
- conv_error_e conv_error = (conv_error_e)error;
+ conv_error = (conv_error_e)error;
callback_info->cb(service_handle, channel_handle, conv_error, payload_handle, callback_info->user_data);
+CATCH:
if (payload_handle) {
delete payload_handle;
}
service_handle->connection_state = CONV_SERVICE_CONNECTION_STATE_CONNECTED;
conv_payload_h payload_handle = new(std::nothrow) _conv_payload_handle();
- IF_FAIL_VOID_TAG(payload_handle, _E, "Memory allocation failed");
+ IF_FAIL_CATCH_TAG(payload_handle, _E, "Memory allocation failed");
payload_handle->jpayload = payload;
callback_info->cb(service_handle, CONV_ERROR_NONE, payload_handle, callback_info->user_data);
delete payload_handle;
+
+CATCH:
delete service_handle;
}