{
if (errorNodes_.containsKey(error))
{
Node errorNode = errorNodes_.get(error);
clearPendingInput();
ConsoleError errorWidget = new ConsoleError(
traceInfo, getErrorClass(), this, command);
if (expand)
errorWidget.setTracebackVisible(true);
// The widget must be added to the root panel to have its event handlers
// wired properly, but this isn't an ideal structure; consider showing
// console output as cell widgets in a virtualized scrolling CellTable
// so we can easily add arbitrary controls.
RootPanel.get().add(errorWidget);
output_.getElement().replaceChild(errorWidget.getElement(),
errorNode);
scrollPanel_.onContentSizeChanged();
errorNodes_.remove(error);
}