mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
#163 Make NBIO file read errors more helpful
This commit is contained in:
parent
2a7406e0fa
commit
cb7d9d161a
@ -52,7 +52,9 @@ public class NBIO implements NBPathsAPI.Facets {
|
||||
}
|
||||
|
||||
public static List<String> readLines(String filename) {
|
||||
Content<?> data = NBIO.all().prefix("data").name(filename).first().orElseThrow();
|
||||
Content<?> data = NBIO.all().prefix("data").name(filename).first().orElseThrow(
|
||||
() -> new BasicError("Unable to read lines from " + filename)
|
||||
);
|
||||
String[] split = data.getCharBuffer().toString().split("\n");
|
||||
return Arrays.asList(split);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user