{
      try
      {
        Command command = commands.next();
        command.redo();
      }
      catch (RuntimeException exception)
      {
        // Skip over the command that threw the exception.
        //
        commands.previous();

        try
        {
          // Iterate back over the executed commands to undo them.
          //
          while (commands.hasPrevious())
          {
            Command command = commands.previous();
            command.undo();
          }
        }
        catch (RuntimeException nestedException)
        {
          CommonPlugin.INSTANCE.log
            (new WrappedException
              (CommonPlugin.INSTANCE.getString("_UI_IgnoreException_exception"), nestedException).fillInStackTrace());
        }

        throw exception;
      }
    }