Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Core Language > Package Development > Messages >
Mathematica > Core Language > Tuning & Debugging > Messages >

MessageList

MessageList[n]
is a global object assigned to be a list of the names of messages generated during the processing of the n^(th) input line.
  • Only messages that are actually output are included in the list MessageList[n].
  • The message names in the list are wrapped with HoldForm.
  • MessageList[n] includes messages generated both by built-in functions and by explicit invocations of Message.
Get any messages that were generated by the previous output:
There were no messages produced in the previous command:
Now the command that gave the message is the third previous command:
Get a list of all the messages that were generated in a session:
Get any messages that were generated by the previous output:
In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
There were no messages produced in the previous command:
In[3]:=
Click for copyable input
Out[3]=
Now the command that gave the message is the third previous command:
In[4]:=
Click for copyable input
Out[4]=
Get a list of all the messages that were generated in a session:
In[5]:=
Click for copyable input
Out[5]=
New in 2
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team