80
38
52
u/MurdoMaclachlan public boolean isInt(int i) { return true; } Jun 02 '21
Image Transcription: Code
public DataCountry getAsDataCountry() {
try {
return DataCountry.valueOf( getName() );
} catch (IllegalArgumentException e) {
LOGGER.error( "environment with ID {} refers to an invalid country: {}", getId(), getName() );
// return Zimbabwe as nobody can expect [REDACTED] to expand there
return DataCountry.ZW;
}
}I'm a human volunteer content transcriber for Reddit and you could be too! If you'd like more information on what we do and why we do it, click here!
31
25
13
u/mestrearcano Jun 02 '21
Meanwhile someone else is trying to figure out why Zimbabwe is getting so many accesses recently and what could explain this trend.
17
3
12
2
0
469
u/szescio Jun 02 '21
Argh, why do people insist on swallowing errors and trying to recover with random data. Failing is good, let it throw