Skip to content

Commit ba943e3

Browse files
author
Neha Burnwal
committed
Adding log for BadLocationException error
1 parent af0ca90 commit ba943e3

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/correction/AddSpaceBeforeValue.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
package org.eclipse.pde.internal.ui.correction;
22

3+
import java.util.logging.Level;
4+
import java.util.logging.Logger;
5+
36
import org.eclipse.core.resources.IMarker;
47
import org.eclipse.jface.text.BadLocationException;
58
import org.eclipse.jface.text.IDocument;
@@ -9,6 +12,8 @@
912

1013
public class AddSpaceBeforeValue extends AbstractManifestMarkerResolution {
1114

15+
private static final Logger logger = Logger.getLogger(AddSpaceBeforeValue.class.getName());
16+
1217
public AddSpaceBeforeValue(int type, IMarker marker) {
1318
super(type, marker);
1419
}
@@ -36,9 +41,8 @@ protected void createChange(BundleModel model) {
3641
doc.replace(offset, colonInd + 1, userHeader);
3742
}
3843
} catch (BadLocationException e) {
39-
// the location has been checked to ensure that it cannot be a bad
40-
// location
41-
e.printStackTrace();
44+
logger.log(Level.SEVERE, "Failed to apply AddSpaceBeforeValue quick fix, unexpected location in the doc", //$NON-NLS-1$
45+
e);
4246
}
4347

4448
}

0 commit comments

Comments
 (0)