# How to find out valid values for an option

In Mathematica 11.0 I want to temporarily change the behavior of error messages via code.

I tried the following code:

(* Disable warnings, but "Ignore" is not a valid value *)
SetOptions[$FrontEnd, MessageOptions -> {"ConsoleMessageAction" -> "Ignore"}] (* do some stuff... *) (* re-enable warnings, "PrintToConsole" is a valid value *) SetOptions[$FrontEnd, MessageOptions -> {"ConsoleMessageAction" -> "PrintToConsole"}]


Re-enabling works, but I can't turn the warnings off. The first command gives the error message

The specified setting for the option MessageOptions, ConsoleMessageAction cannot be used.

How can I find out the proper value for "ConsoleMessageAction" for setting it to Ignore?

You can observe what changes when you set it to Ignore:
Dynamic @ CurrentValue[

And you will see that the corresponding value is an empty list: {};