diff options
author | Dani Megert | 2012-01-10 11:24:01 +0000 |
---|---|---|
committer | Dani Megert | 2012-01-10 11:24:01 +0000 |
commit | 379916cd65ee970ceeb38572ad82a14ce795177c (patch) | |
tree | 15ff842966ae0a240e5b4005b6eb7735e32a0e8f | |
parent | 489c7638f26995c7d30a71353874443e6a7febb9 (diff) | |
download | eclipse.platform.text-379916cd65ee970ceeb38572ad82a14ce795177c.tar.gz eclipse.platform.text-379916cd65ee970ceeb38572ad82a14ce795177c.tar.xz eclipse.platform.text-379916cd65ee970ceeb38572ad82a14ce795177c.zip |
Fixed bug 321664: [templates] IOException while loading templates.xml
should indicate position
-rw-r--r-- | org.eclipse.jface.text/src/org/eclipse/jface/text/templates/persistence/TemplateReaderWriter.java | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/templates/persistence/TemplateReaderWriter.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/templates/persistence/TemplateReaderWriter.java index b0068a82433..4a0aa208ad3 100644 --- a/org.eclipse.jface.text/src/org/eclipse/jface/text/templates/persistence/TemplateReaderWriter.java +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/templates/persistence/TemplateReaderWriter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2010 IBM Corporation and others. + * Copyright (c) 2000, 2012 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -47,6 +47,7 @@ import org.eclipse.core.runtime.Assert; import org.eclipse.jface.text.templates.Template; + /** * Serializes templates as character or byte stream and reads the same format * back. @@ -210,13 +211,7 @@ public class TemplateReaderWriter { } catch (ParserConfigurationException e) { Assert.isTrue(false); } catch (SAXException e) { - Throwable t= e.getCause(); - if (t instanceof IOException) - throw (IOException) t; - else if (t != null) - throw new IOException(t.getMessage()); - else - throw new IOException(e.getMessage()); + throw (IOException)new IOException("Could not read template file").initCause(e); //$NON-NLS-1$ } return null; // dummy |