提交 94d52290 authored 作者: Thomas Mueller's avatar Thomas Mueller

Improved error message

上级 f88e3f5c
...@@ -388,10 +388,16 @@ public class DataUtils { ...@@ -388,10 +388,16 @@ public class DataUtils {
} while (dst.remaining() > 0); } while (dst.remaining() > 0);
dst.rewind(); dst.rewind();
} catch (IOException e) { } catch (IOException e) {
long size;
try {
size = file.size();
} catch (IOException e2) {
size = -1;
}
throw newIllegalStateException( throw newIllegalStateException(
ERROR_READING_FAILED, ERROR_READING_FAILED,
"Reading from {0} failed; length {1} at {2}", "Reading from {0} failed; file length {1} read length {1} at {2}",
file, dst.remaining(), pos, e); file, size, dst.remaining(), pos, e);
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论