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
cb7d9d161a
commit
244217c6a7
@ -89,7 +89,9 @@ public class NBIO implements NBPathsAPI.Facets {
|
|||||||
|
|
||||||
public static Path getFirstLocalPath(String... potentials) {
|
public static Path getFirstLocalPath(String... potentials) {
|
||||||
Optional<Content<?>> first = NBIO.local().name(potentials).first();
|
Optional<Content<?>> first = NBIO.local().name(potentials).first();
|
||||||
return first.orElseThrow().asPath();
|
return first.orElseThrow(
|
||||||
|
() -> new BasicError("Unable to find loadable content at " + String.join(",",potentials))
|
||||||
|
).asPath();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Optional<Path> findFirstLocalPath(String... potentials) {
|
public static Optional<Path> findFirstLocalPath(String... potentials) {
|
||||||
|
Loading…
Reference in New Issue
Block a user