Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions cpp/src/gandiva/gdv_function_stubs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,8 @@ const char* gdv_fn_aes_encrypt(int64_t context, const char* data, int32_t data_l
*out_len = gandiva::aes_encrypt(data, data_len, key_data,
reinterpret_cast<unsigned char*>(ret));
} catch (const std::runtime_error& e) {
gdv_fn_context_set_error_msg(context, e.what());
return nullptr;
std::string err_msg = "Following error occurred while encrypting ciphertext - " + std::string(e.what());
gdv_fn_context_set_error_msg(context, err_msg.data());
}

return ret;
Expand Down Expand Up @@ -363,8 +363,8 @@ const char* gdv_fn_aes_decrypt(int64_t context, const char* data, int32_t data_l
*out_len = gandiva::aes_decrypt(data, data_len, key_data,
reinterpret_cast<unsigned char*>(ret));
} catch (const std::runtime_error& e) {
gdv_fn_context_set_error_msg(context, e.what());
return nullptr;
std::string err_msg = "Following error occurred while decrypting ciphertext - " + std::string(e.what());
gdv_fn_context_set_error_msg(context, err_msg.data());
}

return ret;
Expand Down