// Copyright (C) 2003-2009 by Object Mentor, Inc. All rights reserved.
// Released under the terms of the CPL Common Public License version 1.0.
package fitnesse.testsystems.slim.tables;

import java.util.Collections;
import java.util.List;
import java.util.Map;

import fitnesse.testsystems.slim.SlimTestContext;
import fitnesse.testsystems.slim.Table;
import fitnesse.testsystems.slim.results.Result;

public class SlimErrorTable extends SlimTable {
  public SlimErrorTable(Table table, String id, SlimTestContext testContext) {
    super(table, id, testContext);
  }

  protected String getTableType() {
    return "UnknownTableType";
  }

  public List<Object> getInstructions() {
    return Collections.emptyList();
  }

  public void evaluateExpectations(Map<String, Object> returnValues) {
    String tableType = table.getCellContents(0, 0);
    Result errorMessage = fail(String.format("\"%s\" is not a valid table type.", tableType));
    table.setCell(0, 0, errorMessage);
  }
}

@@ -238,31 +238,8 @@
 st;%0A
-import java.util.Map;%0A%0A
 impo
@@ -663,99 +663,395 @@
     
-return Collections.emptyList();%0A  %7D%0A%0A  public void evaluateExpectations(Map%3CString, 
+addExpectation(new SlimErrorTableExpectation(getInstructionTag()));%0A    return Collections.emptyList();%0A  %7D%0A%0A  public class SlimErrorTableExpectation implements Expectation %7B%0A%0A    private final String instructionTag;%0A%0A    public SlimErrorTableExpectation(String instructionTag) %7B%0A      this.instructionTag = instructionTag;%0A    %7D%0A%0A    @Override%0A    public void evaluateExpectation(
 Object
-%3E
  ret
@@ -1059,24 +1059,26 @@
 rnValues) %7B%0A
+  
     String t
@@ -1117,16 +1117,18 @@
 (0, 0);%0A
+  
     Resu
@@ -1210,24 +1210,26 @@
 ableType));%0A
+  
     table.se
@@ -1255,14 +1255,111 @@
 ssage);%0A
+    %7D%0A%0A    @Override%0A    public String getInstructionTag() %7B%0A      return instructionTag;%0A    %7D%0A%0A
   %7D%0A%7D%0A

Make SlimErrorTable set an expectation for the error results.