You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "tisonkun (via GitHub)" <gi...@apache.org> on 2023/10/15 15:42:31 UTC
[PR] refactor(bindings/java): explict error handling [incubator-opendal]
tisonkun opened a new pull request, #3288:
URL: https://github.com/apache/incubator-opendal/pull/3288
Per https://github.com/apache/incubator-opendal/pull/3286#discussion_r1359896784.
cc @Xuanwo @G-XD
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor(bindings/java): explict error handling [incubator-opendal]
Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on code in PR #3288:
URL: https://github.com/apache/incubator-opendal/pull/3288#discussion_r1359902249
##########
bindings/java/src/lib.rs:
##########
@@ -135,7 +135,9 @@ fn make_presigned_request<'a>(env: &mut JNIEnv<'a>, req: PresignedRequest) -> Re
let mut map = HashMap::new();
for (k, v) in req.header().iter() {
let key = k.to_string();
- let value = v.to_str().map_err(Error::unexpected)?;
+ let value = v.to_str().map_err(|err| {
+ opendal::Error::new(opendal::ErrorKind::Unexpected, &err.to_string())
Review Comment:
I like this change!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] refactor(bindings/java): explict error handling [incubator-opendal]
Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo merged PR #3288:
URL: https://github.com/apache/incubator-opendal/pull/3288
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org