Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #10249

Re: Stop on message?

From Szabolcs Horvát <szhorvat@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Stop on message?
Date 2012-05-29 09:49 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jq262q$6jd$1@smc.vnet.net> (permalink)
References <201205260911.FAA07083@smc.vnet.net> <jpspa5$hb9$1@smc.vnet.net>

Show all headers | View raw


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@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/

Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Stop on message? Sseziwa Mukasa <mukasa@gmail.com> - 2012-05-27 08:40 +0000
  Re: Stop on message? Szabolcs Horvát <szhorvat@gmail.com> - 2012-05-29 09:49 +0000
  Re: Stop on message? Christoph Lhotka <christoph.lhotka@fundp.ac.be> - 2012-05-30 08:13 +0000
  Re: Stop on message? Christoph Lhotka <christoph.lhotka@fundp.ac.be> - 2012-05-30 08:17 +0000
  Re: Stop on message? Szabolcs Horvát <szhorvat@gmail.com> - 2012-05-30 08:10 +0000
  Re: Stop on message? Szabolcs Horvát <szhorvat@gmail.com> - 2012-05-31 06:52 +0000

csiph-web