Next Previous Up Contents
Next: badval
Up: Processing Filters
Previous: addskycoords

6.1.5 assert

Usage:

   assert <test-expr> [<msg-expr>]

Check that a boolean expression is true for each row. If the expression <test-expr> does not evaluate true for any row of the table, execution terminates with an error. As long as no error occurs, the output table is identical to the input one.

If the <msg-expr> parameter is supplied, then on failure it will be evaluated and its value presented in the error message.

The exception generated by an assertion violation is of class uk.ac.starlink.ttools.filter.AssertException although that is not usually obvious if you are running from the shell in the usual way.

Syntax for the <test-expr> and <msg-expr> arguments is described in the manual.


Next Previous Up Contents
Next: badval
Up: Processing Filters
Previous: addskycoords

STILTS - Starlink Tables Infrastructure Library Tool Set
Starlink User Note256
STILTS web page: http://www.starlink.ac.uk/stilts/
Author email: m.b.taylor@bristol.ac.uk
Mailing list: topcat-user@jiscmail.ac.uk