Both Quiet and Internal`DeactivateMessages seem to suppress error messages. Does anyone have any experience with them and found any real differences?

  • $\begingroup$ I don't know what the difference are, but Quiet is invalid in parallel calculations. Maybe you can exam if the later one is invalid as well? $\endgroup$
    – Turgon
    Sep 11, 2016 at 4:34

1 Answer 1


Internal`DeactivateMessages[expr, msg1, msg2, ...] evaluates expr after turning off the given messages. When the second argument is not present (or All) then expr is evaluated in a special mode that does not generate any messages.

An example of a difference would be

Internal`DeactivateMessages[On[Power::infy]; 1/0, Power::infy]

(* gives a message *)

Quiet[On[Power::infy]; 1/0, Power::infy]

(* does not give a message *)

Internal`DeactivateMessages is the older and the simpler function. Quiet has been introduced in version 6.0 and is more sophisticated, as it also has the form

Quiet[expr, msgoff, msgon]

indicating that the messages in the list msgoff should not be generated, but those in msgon should be. Since there can be arbitrary nesting, Quiet acts similarly to a scoping construct, keeping track of the wanted/unwanted messages at each level.

I think the main reason Internal`DeactivateMessages still exists is backward compatibility. There should be no advantage in using it instead of the documented Quiet.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.