Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Issue a message a customized number of times per evaluation
ResourceFunction["LimitedMessage"][n,symbol::tag,e1,e2,…] issues Message[symbol::tag,ei,e2,…] up to n times per evaluation. | |
ResourceFunction["LimitedMessage"][{n,"NoStopMessage"},symbol::tag,e1,e2,…] issues the message up to n times per evaluation and stops without a General::stop message. |
Run an evaluation that issues a message five times, but limit it to only issue twice:
In[1]:= |
Define a function with a message that can be issued up to ten times per input evaluation:
In[2]:= |
Use the function on data that frequently generates a message:
In[3]:= |
Out[3]= |
Prevent a message from being issued at all by limiting the count to zero:
In[4]:= |
Turn off the General::stop message:
In[5]:= |
Alternatively use True or False to control the stop message:
In[6]:= |
In[7]:= |
This work is licensed under a Creative Commons Attribution 4.0 International License