mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-03 01:39:18 +02:00
better exception message
This commit is contained in:
parent
8cc53d747b
commit
4112c4f1b9
1 changed files with 5 additions and 2 deletions
|
@ -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",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue