Bug 284265 [JFace] DialogSettings.save() silently ignores IOException
Build ID: M20090211-1700 (Problem still in HEAD) STEPS TO REPRODUCE Call DialogSettings.save() on a Writer that produced a IOException or with a file which causes trouble during output (e.g. full drive). EXPECTED The original exception thrown by the underlying output should be propagated to the caller -- as "save() throws IOException" suggests. ACTUAL The IOException is silently ignored. ANALYSIS The internal DialogSettings.XMLWriter is based in a java.io.PrintWriter, which catches all IOExceptions.
bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/DialogSettings.java
print(sb.toString());
			}
    	}
    	/**
    	 * start the tag
    	 * @param name the name of the tag
    	 * @param parameters map of parameters
    	 */
    	public void startTag(String name, HashMap parameters) {
    		startTag(name, parameters, true);
    		tab++;
    	}
    	private void startTag(String name, HashMap parameters, boolean newLine) {
    		printTag(name, parameters, true, newLine, false);
    	}
    	private static void appendEscapedChar(StringBuffer buffer, char c) {
    		String replacement = getReplacement(c);
    		if (replacement != null) {
    			buffer.append('&');
    			buffer.append(replacement);
    			buffer.append(';');
    		} else {
    			buffer.append(c);
    		}
    	}
    	private static String getEscaped(String s) {
    		StringBuffer result = new StringBuffer(s.length() + 10);
    		for (int i = 0; i < s.length(); ++i) {
				appendEscapedChar(result, s.charAt(i));
			}