This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

Check

Check
evaluates expr, and returns the result, unless messages were generated, in which case it evaluates and returns failexpr.
Check
checks only for the specified messages.
Check
checks only for messages in the named message group.
  • Check does not test for messages that have been switched off using Off, or by uses of Quiet that occur inside it.
  • The operation of Check is not affected by being enclosed inside Quiet.
  • Explicit message names of the form can be mixed with named message groups.
Return err when a message is generated:
Check only for specific messages:
Return err when a message is generated:
In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
 
Check only for specific messages:
In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
New in 1 | Last modified in 7