aboutsummaryrefslogtreecommitdiffstats
path: root/src/org/apache/fop/apps/AWTCommandLine.java
diff options
context:
space:
mode:
authorfotis <fotis@unknown>2000-06-27 22:14:35 +0000
committerfotis <fotis@unknown>2000-06-27 22:14:35 +0000
commitf11bad903dbef3d04d48b3a219fb0adb139ce953 (patch)
treee941d36bfd0fd6da736eb02c3e42ac84066d1a84 /src/org/apache/fop/apps/AWTCommandLine.java
parent7724f41ad6e9e484f9a37b54b6a63fe3cb9c90ef (diff)
downloadxmlgraphics-fop-f11bad903dbef3d04d48b3a219fb0adb139ce953.tar.gz
xmlgraphics-fop-f11bad903dbef3d04d48b3a219fb0adb139ce953.zip
replaces calls of System.err.println etc. with calls to the new MessageHandler methods
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@193441 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/org/apache/fop/apps/AWTCommandLine.java')
-rw-r--r--src/org/apache/fop/apps/AWTCommandLine.java26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/org/apache/fop/apps/AWTCommandLine.java b/src/org/apache/fop/apps/AWTCommandLine.java
index e9da9c501..3350ec767 100644
--- a/src/org/apache/fop/apps/AWTCommandLine.java
+++ b/src/org/apache/fop/apps/AWTCommandLine.java
@@ -6,11 +6,11 @@ package org.apache.fop.apps;
Rainer Steinkuhle: Rainer.Steinkuhle@jcatalog.com,
Stanislav Gorkhover: Stanislav.Gorkhover@jcatalog.com
*/
-
-
+import org.apache.fop.messaging.MessageHandler;
import org.apache.fop.viewer.*;
import org.apache.fop.render.awt.*;
+
import javax.swing.UIManager;
import java.awt.*;
@@ -72,7 +72,7 @@ public class AWTCommandLine {
if (parser == null) {
- System.err.println("ERROR: Unable to create SAX parser");
+ MessageHandler.errorln("ERROR: Unable to create SAX parser");
System.exit(1);
}
@@ -102,8 +102,8 @@ public class AWTCommandLine {
frame.progress(resource.getString("Show"));
} catch (Exception e) {
- System.err.println("FATAL ERROR: " + e.getMessage());
- e.printStackTrace();
+ MessageHandler.errorln("FATAL ERROR: " + e.getMessage());
+ e.printStackTrace();
System.exit(1);
}
}
@@ -115,20 +115,20 @@ public class AWTCommandLine {
if (parserClassName == null) {
parserClassName = "com.jclark.xml.sax.Driver";
}
- System.err.println("using SAX parser " + parserClassName);
+ MessageHandler.errorln("using SAX parser " + parserClassName);
try {
return (Parser)
Class.forName(parserClassName).newInstance();
} catch (ClassNotFoundException e) {
- System.err.println("Could not find " + parserClassName);
+ MessageHandler.errorln("Could not find " + parserClassName);
} catch (InstantiationException e) {
- System.err.println("Could not instantiate "
+ MessageHandler.errorln("Could not instantiate "
+ parserClassName);
} catch (IllegalAccessException e) {
- System.err.println("Could not access " + parserClassName);
+ MessageHandler.errorln("Could not access " + parserClassName);
} catch (ClassCastException e) {
- System.err.println(parserClassName + " is not a SAX driver");
+ MessageHandler.errorln(parserClassName + " is not a SAX driver");
}
return null;
}
@@ -186,7 +186,7 @@ public class AWTCommandLine {
URL url = getClass().getResource(path);
in = url.openStream();
} catch(Exception ex) {
- System.out.println("Can't find URL to: <" + path + "> " + ex.getMessage());
+ MessageHandler.logln("Can't find URL to: <" + path + "> " + ex.getMessage());
}
return new SecureResourceBundle(in);
}
@@ -205,9 +205,9 @@ public class AWTCommandLine {
String language = null;
String imageDir = null;
- System.err.println(Version.getVersion());
+ MessageHandler.errorln(Version.getVersion());
if (args.length < 1 || args.length > 3) {
- System.err.println("usage: java AWTCommandLine " +
+ MessageHandler.errorln("usage: java AWTCommandLine " +
"formatting-object-file [language] ");
System.exit(1);
}