mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-26 22:41:59 -04:00
avoid verbose console output if settings file is not present
This commit is contained in:
parent
faf4844b63
commit
be2ad8319e
@ -51,11 +51,13 @@ public final class Settings implements AttributeListener {
|
||||
filename = new File(new File(System.getProperty("user.home")), ".digital.cfg");
|
||||
|
||||
ElementAttributes attr = null;
|
||||
XStream xStream = Circuit.getxStream();
|
||||
try (InputStream in = new FileInputStream(filename)) {
|
||||
attr = (ElementAttributes) xStream.fromXML(in);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
if (filename.exists()) {
|
||||
XStream xStream = Circuit.getxStream();
|
||||
try (InputStream in = new FileInputStream(filename)) {
|
||||
attr = (ElementAttributes) xStream.fromXML(in);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
if (attr == null) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user