Skip to content

Commit

Permalink
Changed System.err with the more appropriate Log.
Browse files Browse the repository at this point in the history
  • Loading branch information
Amedeo Paglione committed Sep 21, 2003
1 parent 097334e commit 7108050
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions com/gallery/GalleryRemote/util/GRI18n.java
Expand Up @@ -6,6 +6,7 @@
package com.gallery.GalleryRemote.util;

import com.gallery.GalleryRemote.GalleryRemote;
import com.gallery.GalleryRemote.Log;
import com.gallery.GalleryRemote.prefs.PreferenceNames;

import java.util.Locale;
Expand All @@ -14,6 +15,8 @@

public class GRI18n implements PreferenceNames {
private static final String RESNAME = "com.gallery.GalleryRemote.resources.GRResources";
private static final String MODULE = "MainFrame";

private static GRI18n ourInstance;
private Locale grLocale;
private ResourceBundle grResBundle;
Expand Down Expand Up @@ -51,10 +54,12 @@ public String getString(String key) {
try {
msg = grResBundle.getString(key);
} catch (NullPointerException e) {
System.err.println(e.toString());
Log.log(Log.ERROR, MODULE, "Key null error");
Log.logException(Log.ERROR, MODULE, e);
msg = "[NULLKEY]";
} catch (MissingResourceException e) {
System.err.println(e.toString());
Log.log(Log.INFO, MODULE, "Key [" + key + "] not defined");
Log.logException(Log.INFO, MODULE, e);
msg = "["+key+"]";
}

Expand All @@ -66,7 +71,8 @@ private void setResBoundle() {
try {
grResBundle = ResourceBundle.getBundle(RESNAME, grLocale);
} catch (MissingResourceException e) {
System.err.println(e.toString());
Log.log(Log.ERROR, MODULE, "Resource bundle error");
Log.logException(Log.ERROR, MODULE, e);
}
}

Expand Down

0 comments on commit 7108050

Please sign in to comment.