diff options
author | Chris Goldthorpe | 2010-01-20 17:34:04 +0000 |
---|---|---|
committer | Chris Goldthorpe | 2010-01-20 17:34:04 +0000 |
commit | 6c521892058b8e403893d697280c5ff1ae9c6e89 (patch) | |
tree | 9487227403de12823a842d3e1df43ebbe03c69fa | |
parent | 94cc7fed06df6efe88c2180d5343f149f9e2e40d (diff) | |
download | eclipse.platform.ua-6c521892058b8e403893d697280c5ff1ae9c6e89.tar.gz eclipse.platform.ua-6c521892058b8e403893d697280c5ff1ae9c6e89.tar.xz eclipse.platform.ua-6c521892058b8e403893d697280c5ff1ae9c6e89.zip |
Bug 300189 Line:Column information missing for errors logged due SAX parse exception when reading TOCv20100120
-rw-r--r-- | org.eclipse.help/src/org/eclipse/help/internal/toc/TocFileProvider.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/org.eclipse.help/src/org/eclipse/help/internal/toc/TocFileProvider.java b/org.eclipse.help/src/org/eclipse/help/internal/toc/TocFileProvider.java index b4e13feca..c74e9540e 100644 --- a/org.eclipse.help/src/org/eclipse/help/internal/toc/TocFileProvider.java +++ b/org.eclipse.help/src/org/eclipse/help/internal/toc/TocFileProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2009 IBM Corporation and others. + * Copyright (c) 2006, 2010 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 @@ -21,6 +21,7 @@ import org.eclipse.help.AbstractTocProvider; import org.eclipse.help.ITocContribution; import org.eclipse.help.internal.HelpPlugin; import org.eclipse.help.internal.util.ResourceLocator; +import org.xml.sax.SAXParseException; /* * Provides toc data from toc XML files to the help system. @@ -47,10 +48,17 @@ public class TocFileProvider extends AbstractTocProvider { contributions.add(toc); } catch (Throwable t) { + String locationInfo = ""; //$NON-NLS-1$ + if (t instanceof SAXParseException) { + SAXParseException spe = (SAXParseException) t; + locationInfo = " at line " + spe.getLineNumber() //$NON-NLS-1$ + + ", column " + spe.getColumnNumber(); //$NON-NLS-1$ + } String pluginId = tocFiles[i].getPluginId(); String file = tocFiles[i].getFile(); String msg = "Error reading help table of contents file /\"" //$NON-NLS-1$ + ResourceLocator.getErrorPath(pluginId, file, locale) + + locationInfo + "\" (skipping file)"; //$NON-NLS-1$ HelpPlugin.logError(msg, t); } |