Compare commits

...

2 Commits

Author SHA1 Message Date
Michael Pfaff 2b2b47454c
Remove build.sbt 2022-09-09 07:29:10 -04:00
Michael Pfaff b1ef65e2a9
Suppress std::io::NotFound errors 2022-08-16 14:31:44 -04:00
2 changed files with 22 additions and 15 deletions

View File

@ -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
}
}

View File

@ -1,11 +0,0 @@
ThisBuild / organization := "com.discord"
ThisBuild / version := "0.2.1"
lazy val root = (project in file("."))
.settings(
name := "discord-rpc"
)
//libraryDependencies += "org.scalactic" %% "scalactic" % "3.2.10"
//libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.10" % "test"
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.10" % Test