range.surroundContents(cursorNode);
debugMessage("surrounding range ok");
}
}
} catch (Exception e) {
<BUG>try {
debugMessage("Exception: " + e.getMessage());
debugMessage("error surrounding range");
if (range!=null) {</BUG>
debugMessage("Start container: " + range.getStartContainer());

range.surroundContents(cursorNode);
debugMessage("surrounding range ok");
}
}
} catch (Exception e) {
try {
debugMessage("error surrounding range");
debugMessage("Exception: " + e.getMessage());
e.printStackTrace();
debugMessage(e.toString());
if (range!=null) {
debugMessage("Start container: " + range.getStartContainer());
