fix(random names): log error message upon failure
This commit is contained in:
parent
68ad4ac9b5
commit
d784ed448f
1 changed files with 3 additions and 3 deletions
|
@ -27,10 +27,10 @@ public class RandomNameFetcher {
|
||||||
final String[] values = line.split("\n");
|
final String[] values = line.split("\n");
|
||||||
records.add(Arrays.asList(values));
|
records.add(Arrays.asList(values));
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
|
||||||
throw new RuntimeException(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
return records.get(new Random().nextInt(records.size() - 1)).get(0);
|
return records.get(new Random().nextInt(records.size() - 1)).get(0);
|
||||||
|
} catch (IOException e) {
|
||||||
|
instance.getLogger().severe("Unable to fetch random names.");
|
||||||
|
return "Ineanto";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue