MathGroup Archive 2012

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

Search the Archive

Re: Stop on message?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg126657] Re: Stop on message?
  • From: Szabolcs Horvát <szhorvat at gmail.com>
  • Date: Tue, 29 May 2012 05:47:11 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <201205260911.FAA07083@smc.vnet.net> <jpspa5$hb9$1@smc.vnet.net>

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:

http://mathematica.stackexchange.com/questions/5534/check-does-not-interrupt-evaluation-of-the-expression-when-a-message-is-emitted

Please see here for a method that will reliably abort immediately when a 
message is generated.

http://mathematica.stackexchange.com/questions/1512/how-to-abort-on-any-message-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 gmail.com>  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
>>
>


-- 
Szabolcs Horvát
Visit Mathematica.SE:  http://mathematica.stackexchange.com/



  • Prev by Date: Re: Sqrt of complex number
  • Next by Date: Simplify and then discretize a set of equations with derivatives and integrals
  • Previous by thread: Re: Stop on message?
  • Next by thread: Re: Stop on message?