提交 2b8c95ff authored 作者: Thomas Mueller's avatar Thomas Mueller

The wrong error message was thrown when trying to open a database where the…

The wrong error message was thrown when trying to open a database where the database file could not be read for some reason (for example because the split file system was used, and the file was split at the wrong position). 
上级 ca010854
......@@ -254,10 +254,11 @@ public class FileSystemSplit extends FileSystem {
}
private void closeAndThrow(FileObject[] array, FileObject o, long maxLength) throws IOException {
String message = "Expected file length: " + maxLength + " got: " + o.length() + " for " + o.getName();
for (FileObject f : array) {
f.close();
}
throw new IOException("Expected file length: " + maxLength + " got: " + o.length() + " for " + o.getName());
throw new IOException(message);
}
public OutputStream openFileOutputStream(String fileName, boolean append) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论