Fixture.error() as well as exception()?

Rick Mugridge <[email protected]> Tue, 23 Sep 2003 22:19:49 +1200
Newsgroups gmane.comp.programming.tools.fit.devel
Message-ID <[email protected]>
I have code in several specialised fixture that has to throw an 
exception (and thus call Fixture.exception()) because an argument is 
invalid or whatever. The exception stackdump is irrelevant and clutters 
up the result when all I want is to provide a simple error message. Eg, 
"Unknown state".

Has anyone else struck this?

So I suggest adding a new 'colouring' method to Fixture, such as 
error(). It takes a cell and a String and acts like wrong(), except that 
the top half is just whatever was in the cell before and the bottom half 
is just the error message.

That is, something like

    public void error(Parse cell, String message) {
        wrong(cell);
        cell.addToBody("<hr>" + escape(message));
    }


Cheers, Rick