diff options
-rw-r--r-- | spark-common/src/main/java/me/lucko/spark/common/sampler/async/AsyncProfilerAccess.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/spark-common/src/main/java/me/lucko/spark/common/sampler/async/AsyncProfilerAccess.java b/spark-common/src/main/java/me/lucko/spark/common/sampler/async/AsyncProfilerAccess.java index 50e97aa..cf9572a 100644 --- a/spark-common/src/main/java/me/lucko/spark/common/sampler/async/AsyncProfilerAccess.java +++ b/spark-common/src/main/java/me/lucko/spark/common/sampler/async/AsyncProfilerAccess.java @@ -66,7 +66,11 @@ public final class AsyncProfilerAccess { } // get an instance of async-profiler - return AsyncProfiler.getInstance(extractPath.toAbsolutePath().toString()); + try { + return AsyncProfiler.getInstance(extractPath.toAbsolutePath().toString()); + } catch (UnsatisfiedLinkError e) { + throw new RuntimeException("A runtime error occurred whilst loading the native library", e); + } } /** An instance of the async-profiler Java API. */ |