diff options
author | Jakob Odersky <jodersky@gmail.com> | 2015-05-12 22:31:10 +0200 |
---|---|---|
committer | Jakob Odersky <jodersky@gmail.com> | 2015-05-12 22:31:10 +0200 |
commit | 53f38c72664653f433d01cb645c9f6daa9269a58 (patch) | |
tree | 56111634fca51c070ada2e8eda701cd82fc7b348 /flow-main | |
parent | 337562bee60bd271aa110e7f7eec30f7755b18f6 (diff) | |
download | akka-serial-53f38c72664653f433d01cb645c9f6daa9269a58.tar.gz akka-serial-53f38c72664653f433d01cb645c9f6daa9269a58.tar.bz2 akka-serial-53f38c72664653f433d01cb645c9f6daa9269a58.zip |
better error messages in native library extraction
Diffstat (limited to 'flow-main')
-rw-r--r-- | flow-main/src/main/scala/com/github/jodersky/flow/internal/NativeLoader.scala | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/flow-main/src/main/scala/com/github/jodersky/flow/internal/NativeLoader.scala b/flow-main/src/main/scala/com/github/jodersky/flow/internal/NativeLoader.scala index 2526293..dc539ea 100644 --- a/flow-main/src/main/scala/com/github/jodersky/flow/internal/NativeLoader.scala +++ b/flow-main/src/main/scala/com/github/jodersky/flow/internal/NativeLoader.scala @@ -42,10 +42,12 @@ object NativeLoader { private def loadFromJar(library: String) = { val fqlib = System.mapLibraryName(library) //fully qualified library name - extract(s"/native/${os}-${arch}/${fqlib}", fqlib) match { + val path = s"/native/${os}-${arch}/${fqlib}" + extract(path, fqlib) match { case Some(file) => System.load(file.getAbsolutePath) case None => throw new UnsatisfiedLinkError("Cannot extract flow's native library, " + - "the native library may not exist for your specific architecture/OS combination.") + "the native library does not exist for your specific architecture/OS combination." + + "Could not find " + path + ".") } } @@ -55,4 +57,4 @@ object NativeLoader { case ex: UnsatisfiedLinkError => loadFromJar(library) } -}
\ No newline at end of file +} |