Suppress std::io::NotFound errors
This commit is contained in:
parent
2aaa043bd2
commit
b1ef65e2a9
|
@ -36,10 +36,28 @@ pub extern "system" fn Java_com_discord_rpc_DiscordRPC_connect(
|
|||
match jni_connect(env, obj, client_id) {
|
||||
Ok(_) => true,
|
||||
Err(e) => {
|
||||
error!(
|
||||
concat!("at ", file!(), ":", line!(), ":", column!(), ": {}"),
|
||||
e
|
||||
);
|
||||
match e.downcast::<std::io::Error>() {
|
||||
Ok(e) => {
|
||||
if e.kind() == std::io::ErrorKind::NotFound {
|
||||
debug!(
|
||||
concat!("at ", file!(), ":", line!(), ":", column!(), ": {}"),
|
||||
e
|
||||
);
|
||||
return false;
|
||||
} else {
|
||||
error!(
|
||||
concat!("at ", file!(), ":", line!(), ":", column!(), ": {}"),
|
||||
e
|
||||
);
|
||||
}
|
||||
}
|
||||
Err(e) => {
|
||||
error!(
|
||||
concat!("at ", file!(), ":", line!(), ":", column!(), ": {}"),
|
||||
e
|
||||
);
|
||||
}
|
||||
}
|
||||
false
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue