DOCUMENTATION CENTER SEARCH
Mathematica
>
Messages
>
Built-in
Mathematica
Symbol
Messages
Loops and Control Structures
Tutorials »
|
Catch
MessageList
$MessageList
Message
Quiet
Indeterminate
TimeConstrained
CheckAbort
See Also »
|
Conditionals
Flow Control
Messages
Package Development
Scoping Constructs
Tuning & Debugging
More About »
Check
Check
[
expr
,
failexpr
]
evaluates
expr
, and returns the result, unless messages were generated, in which case it evaluates and returns
failexpr
.
Check
[
expr
,
failexpr
, {
s
1
::
t
1
,
s
2
::
t
2
,
...
}]
checks only for the specified messages.
MORE INFORMATION
Check
has attribute
HoldAll
.
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
.
EXAMPLES
CLOSE ALL
Basic Examples
(2)
Return
err
when a message is generated:
In[1]:=
Out[1]=
In[2]:=
Out[2]=
Check only for specific messages:
In[1]:=
Out[1]=
In[2]:=
Out[2]=
SEE ALSO
Catch
MessageList
$MessageList
Message
Quiet
Indeterminate
TimeConstrained
CheckAbort
TUTORIALS
Messages
Loops and Control Structures
MORE ABOUT
Conditionals
Flow Control
Messages
Package Development
Scoping Constructs
Tuning & Debugging
New in 1 | Last modified in 6
© 2008 Wolfram Research, Inc.