Skip to content

Commit

Permalink
exception handling
Browse files Browse the repository at this point in the history
  • Loading branch information
oyvindberg committed Jan 31, 2023
1 parent 94e376f commit 1008f48
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 2 additions & 0 deletions crossterm/src/java/tui/crossterm/CrosstermJni.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ public class CrosstermJni {
static {
try {
NativeLoader.load("crossterm");
} catch (RuntimeException e) {
throw e;
} catch (Exception e) {
throw new RuntimeException(e);
}
Expand Down
5 changes: 1 addition & 4 deletions crossterm/src/java/tui/crossterm/NativeLoader.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
package tui.crossterm;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;

import static java.util.Arrays.asList;

class NativeLoader {
public static void load(String nativeLibrary) throws Exception {
try {
Expand All @@ -15,7 +12,7 @@ public static void load(String nativeLibrary) throws Exception {
}
}

static String withPlatformName(String lib) throws IOException, InterruptedException {
static String withPlatformName(String lib) {
if (System.getProperty("org.graalvm.nativeimage.imagecode") != null)
return "/" + lib;
else {
Expand Down

0 comments on commit 1008f48

Please sign in to comment.