Command: unittest::pass_or_die

NEST HelpDesk Command Index NEST Quick Reference

Name:
 unittest::pass_or_die - Execute a code block and quit with exit code 2 if it fails.

Synopsis:
 {code}        pass_or_die -> -
          {code} string pass_or_die -> -

Diagnostics:
This function will quit nest if the code block raises any error.
It will print an error message to cerr, too. If string is given, it will be 
included in the error message.

Examples:
/unittest (7378) require
/unittest using
  {1 1 add} pass_or_die
  {1 /hello add} (testing /hello) pass_or_die
endusing

Author:
 R. Kupper

FirstVersion:
 2-jul-2008

Availability:
 SLI-2.0

SeeAlso:unittest::assert_or_die unittest::fail_or_die stopped assert quit
Source:
 /home/abuild/rpmbuild/BUILD/nest-2.4.1/lib/sli/unittest.sli

NEST HelpDesk Command Index NEST Quick Reference

© 2000-2010 The NEST Initiative