ShadowySpirits commented on code in PR #2209:
URL:
https://github.com/apache/incubator-opendal/pull/2209#discussion_r1185743004
##########
bindings/java/src/macros.rs:
##########
Review Comment:
> I prefer write them directly, maybe via map_err().
The point is we can not return an error with `?`:
```rust
let result = op.do_something().map_err()?;
```
But must throw an exception manually:
```rust
if let Err(error) = result {
let exception = build_java_exception();
env.throw(exception).unwrap();
return;
}
```
Why not use the macro to avoid duplicated code?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]