How does NIntegrate suppress messages?
- To: mathgroup at smc.vnet.net
- Subject: [mg62410] How does NIntegrate suppress messages?
- From: "Andrew Moylan" <andrew.moylan at anu.edu.au>
- Date: Wed, 23 Nov 2005 01:12:51 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
Whenever the integrand in NIntegrate generates messages (by calling
Message), the output of these messages are suppressed, although they are
still generated in the sense that they can be caught using Check. Does
anyone know how NIntegrate does this?
Here is an example in which evaluating f at a number always generates a
message, but no messages are displayed when f is called (many times) by
NIntegrate (if you like I can also supply an example that shows that the
suppressed messages can still be caught by calls to Check):
f::err = "error";
f[x_?NumericQ] :=
(
Message[f::err];
x
)
NIntegrate[f[x], {x, 0, 1}]