1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-03 09:49:19 +02:00

better exception message

This commit is contained in:
Nikolay Pultsin 2015-09-11 21:33:54 +03:00
parent 8cc53d747b
commit 4112c4f1b9

View file

@ -106,14 +106,17 @@ public class NativeFormatPlugin extends BuiltinFormatPlugin {
@Override
synchronized public void readModel(BookModel model) throws BookReadingException {
final int code;
final String tempDirectory = SystemInfo.tempDirectory();
synchronized (ourNativeLock) {
code = readModelNative(model, SystemInfo.tempDirectory());
code = readModelNative(model, tempDirectory);
}
switch (code) {
case 0:
return;
case 3:
throw new CachedCharStorageException("Cannot write file from native code");
throw new CachedCharStorageException(
"Cannot write file from native code to " + tempDirectory
);
default:
throw new BookReadingException(
"nativeCodeFailure",