Added error logging to SettingsDialogue as requested by toolforger.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10500 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
ceba00624a
commit
ce07608e5c
@ -258,9 +258,8 @@ public final class SettingsDialog extends JDialog {
|
|||||||
try {
|
try {
|
||||||
URL file = new URL("file:" + image);
|
URL file = new URL("file:" + image);
|
||||||
setImage(file);
|
setImage(file);
|
||||||
// We can safely ignore the exception - it just means that the user
|
|
||||||
// gave us a bogus file
|
|
||||||
} catch (MalformedURLException e) {
|
} catch (MalformedURLException e) {
|
||||||
|
logger.log(Level.WARNING, "Couldn’t read from file '" + image + "'", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -503,7 +502,7 @@ public final class SettingsDialog extends JDialog {
|
|||||||
Method setIconImages = getClass().getMethod("setIconImages", List.class);
|
Method setIconImages = getClass().getMethod("setIconImages", List.class);
|
||||||
setIconImages.invoke(this, icons);
|
setIconImages.invoke(this, icons);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
return;
|
logger.log(Level.WARNING, "Error setting icon images", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -697,6 +696,7 @@ public final class SettingsDialog extends JDialog {
|
|||||||
try {
|
try {
|
||||||
url = new URL("file:" + file);
|
url = new URL("file:" + file);
|
||||||
} catch (MalformedURLException e) {
|
} catch (MalformedURLException e) {
|
||||||
|
logger.log(Level.WARNING, "Invalid file name '" + file + "'", e);
|
||||||
}
|
}
|
||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user