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:
parent
8cc53d747b
commit
4112c4f1b9
1 changed files with 5 additions and 2 deletions
|
@ -106,14 +106,17 @@ public class NativeFormatPlugin extends BuiltinFormatPlugin {
|
||||||
@Override
|
@Override
|
||||||
synchronized public void readModel(BookModel model) throws BookReadingException {
|
synchronized public void readModel(BookModel model) throws BookReadingException {
|
||||||
final int code;
|
final int code;
|
||||||
|
final String tempDirectory = SystemInfo.tempDirectory();
|
||||||
synchronized (ourNativeLock) {
|
synchronized (ourNativeLock) {
|
||||||
code = readModelNative(model, SystemInfo.tempDirectory());
|
code = readModelNative(model, tempDirectory);
|
||||||
}
|
}
|
||||||
switch (code) {
|
switch (code) {
|
||||||
case 0:
|
case 0:
|
||||||
return;
|
return;
|
||||||
case 3:
|
case 3:
|
||||||
throw new CachedCharStorageException("Cannot write file from native code");
|
throw new CachedCharStorageException(
|
||||||
|
"Cannot write file from native code to " + tempDirectory
|
||||||
|
);
|
||||||
default:
|
default:
|
||||||
throw new BookReadingException(
|
throw new BookReadingException(
|
||||||
"nativeCodeFailure",
|
"nativeCodeFailure",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue