I got a random error message.
expr = N[Pi, a]
expr = Sin[x,
The error message does not appear in the 'Output Cell'.
In : msg = "How do I write the code?"
However, you must write the code using only 'expr' or 'N[Pi,a]'
Out : "N::precbd :: Requested precision a is not a machine-sized real number
between $MinPrecision and $MaxPrecision."
I want to assign an error message to the symbol and continue the additional work. What should I do?







Checkwhich specific messages you care about, if that would be helpful to you. Also, just in case it wasn't clear, you can put whatever you want in place of"the result if fail". – lericr Nov 20 '23 at 00:03Check[N[Pi, a], $MessageList]– kglr Nov 20 '23 at 08:59