mirror of
https://github.com/vacp2p/linea-besu.git
synced 2026-01-09 23:47:57 -05:00
Adding filechannel name to the exception (#3064)
Signed-off-by: Jiri Peinlich <jiri.peinlich@gmail.com> Co-authored-by: Sally MacFarlane <sally.macfarlane@consensys.net>
This commit is contained in:
@@ -89,7 +89,8 @@ public class FlatFileTaskCollection<T> implements TaskCollection<T> {
|
||||
StandardOpenOption.WRITE,
|
||||
StandardOpenOption.CREATE);
|
||||
} catch (final IOException e) {
|
||||
throw new StorageException(e);
|
||||
throw new StorageException(
|
||||
"There was a problem opening FileChannel " + pathForFileNumber(fileNumber), e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,7 +107,8 @@ public class FlatFileTaskCollection<T> implements TaskCollection<T> {
|
||||
writeFileChannel = openWriteFileChannel(writeFileNumber);
|
||||
}
|
||||
} catch (final IOException e) {
|
||||
throw new StorageException(e);
|
||||
throw new StorageException(
|
||||
"There was a problem adding to FileChannel " + pathForFileNumber(writeFileNumber), e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -123,7 +125,8 @@ public class FlatFileTaskCollection<T> implements TaskCollection<T> {
|
||||
size--;
|
||||
return task;
|
||||
} catch (final IOException e) {
|
||||
throw new StorageException(e);
|
||||
throw new StorageException(
|
||||
"There was a problem removing from FileChannel " + pathForFileNumber(readFileNumber), e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -249,6 +252,10 @@ public class FlatFileTaskCollection<T> implements TaskCollection<T> {
|
||||
StorageException(final Throwable t) {
|
||||
super(t);
|
||||
}
|
||||
|
||||
StorageException(final String m, final Throwable t) {
|
||||
super(m, t);
|
||||
}
|
||||
}
|
||||
|
||||
private static class FlatFileTask<T> implements Task<T> {
|
||||
|
||||
Reference in New Issue
Block a user