Only print stack trace if dev mode

This commit is contained in:
chimp1984 2021-10-20 23:49:53 +02:00
parent d7f1b00221
commit 02d7dfdaef
No known key found for this signature in database
GPG key ID: 9801B4EC591F90E3

View file

@ -120,13 +120,13 @@ public class Res {
.replace("bitcoin", baseCurrencyNameLowerCase);
} catch (MissingResourceException e) {
log.warn("Missing resource for key: {}", key);
if (DevEnv.isDevMode()) {
e.printStackTrace();
if (DevEnv.isDevMode())
UserThread.runAfter(() -> {
// We delay a bit to not throw while UI is not ready
throw new RuntimeException("Missing resource for key: " + key);
}, 1);
}
return key;
}
}