Revision: 7672
Author: victormote
Date: 2006-06-17 08:38:21 -0700 (Sat, 17 Jun 2006)
ViewCVS: http://svn.sourceforge.net/foray/?rev=7672&view=rev
Log Message:
-----------
1. Improve error logging.
2. Add to-do item regarding the severity of a bad URL.
Modified Paths:
--------------
trunk/foray/foray-font/src/java/org/foray/font/FontConfigParser.java
Modified: trunk/foray/foray-font/src/java/org/foray/font/FontConfigParser.java
===================================================================
--- trunk/foray/foray-font/src/java/org/foray/font/FontConfigParser.java 2006-06-17 14:18:55 UTC (rev 7671)
+++ trunk/foray/foray-font/src/java/org/foray/font/FontConfigParser.java 2006-06-17 15:38:21 UTC (rev 7672)
@@ -471,16 +471,29 @@
String refID = attributes.getValue("ref");
URL fontFileURL = null;
- URL metricsFileURL = null;
- try {
- if (fontFile != null) {
+ if (fontFile != null) {
+ try {
fontFileURL = new URL(this.currentXMLBase, fontFile);
+ } catch (MalformedURLException e) {
+ this.logError("Malformed URL in font configuration:\n"
+ + " " + fontFile);
+ /* TODO: Just invalidate this one font and warn the user instead
+ * of invalidating everything. */
+ fontServer.setFatalConfigurationError(true);
}
- if (metricsFile != null) {
+ }
+
+ URL metricsFileURL = null;
+ if (metricsFile != null) {
+ try {
metricsFileURL = new URL(this.currentXMLBase, metricsFile);
+ } catch (MalformedURLException e) {
+ this.logError("Malformed URL in font configuration:\n"
+ + " " + metricsFile);
+ /* TODO: Just invalidate this one font and warn the user instead
+ * of invalidating everything. */
+ fontServer.setFatalConfigurationError(true);
}
- } catch (Exception e) {
- fontServer.setFatalConfigurationError(true);
}
/* TODO vh: check that if ref is declared, it is alone */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|