Services & Resources / Wolfram Forums / MathGroup Archive

MathGroup Archive 2012

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Stop on message?


  in my opinion messages in Mathematica are generated during the 
evaluation process to give
some kind of "meta"-information about 1) what is going wrong or 2) what 
you need to know
to check by yourself to know of the returned result is correct.

I would like to compare this information with the concepts of "errors" 
and "warnings" produced
by a compiler during the process to produce a program.

Seeing "Mathematica messages" in this flavour any input which produces a 
message should be
seen as wrong or not working properly and therefore be modified as long 
as there are no
messages left at all.

I therefore do not see a reason yet why I should use messages outside 
the development
phase of a project.

Can you provide me with one?



On 05/29/2012 11:47 AM, Szabolcs Horvát wrote:
> There were two replies suggesting to use Check[] to abort evaluation
> when a message is generated.
> Note that while Check does return a different result if a message was
> generated, it does not actually interrupt evaluation (it completed the
> evaluation of 'expr').
> See here for an example:
> Please see here for a method that will reliably abort immediately when a
> message is generated.
> On 2012.05.27. 10:40, Sseziwa Mukasa wrote:
>> Check[expr,Return[]]
>> On May 26, 2012, at 5:11 AM, Ralph Dratman<ralph.dratman at>   wrote:
>>> Hi,
>>> Is there a simple way to get Mathematica to stop evaluating (like
>>> Interrupt) whenever a message is issued?
>>> I realize the debugger has that feature, but I would prefer not to use
>>> it in this case.
>>> Thank you.
>>> Ralph Dratman

  • Prev by Date: Re: Notebook Format History?
  • Next by Date: Re: GraphPath With Edge Weights
  • Previous by thread: Re: Stop on message?
  • Next by thread: Re: Stop on message?