Re: Re: Limiting the number of messages
- To: mathgroup at smc.vnet.net
- Subject: [mg103967] Re: [mg103937] Re: Limiting the number of messages
- From: DrMajorBob <btreat1 at austin.rr.com>
- Date: Wed, 14 Oct 2009 07:54:48 -0400 (EDT)
- References: <hahsi2$jm$1@smc.vnet.net> <200910131120.HAA29409@smc.vnet.net>
- Reply-to: drmajorbob at yahoo.com
I'd be satisfied if they'd just get keyboard or menu-driven abort to simply ABORT reliably. It's ridiculous, the number of times I've had to force-quit Mathematica... sometimes because I have a bug, but more often because the computation is simply too slow to let it continue. Bobby On Tue, 13 Oct 2009 06:20:30 -0500, David Bailey <dave at removedbailey.co.uk> wrote: > Sean McConnell wrote: >> Hi, >> >> I'm creating a program with procedures that often depend on >> sub-procedures. Many times I allow the sub-procedures to do the input >> checking, so I don't have to write a the same error trapping conditions >> and messages for each level of the program. The problem is however that >> although the 'input checking' is passed on to a sub-procedure, the main >> procedure continues to attempt to evaluate, and can usually return a >> very long list of error messages whilst it foolishly attempting to >> evaluate with improperly input variables. >> >> I would like to know how to make a procedure abort its evaluation after >> say 3 or so messages, and simply return the name of the procedure and >> the variables (as happens when you use /; for conditionals). I have >> tried the use of Check[], and although it checks for messages, it will >> only return what is typed in to the space for a second argument (eg: >> Check[f[a], "problem"] will return simply "problem"), I would like to be >> able to tell the user how they have screwed up. >> >> Many thanks, >> >> Sean McConnell. >> >> > Really, you need to be able to stop processing (after generating an > error message or something) and come out to a much higher level of your > program. The Throw and Catch functions should enable you to do this. If > you simply need to stop executing altogether after issuing an error > message, Abort[] is useful. > > Note however that Abort[] will not stop the execution of subsequent > cells if a whole notebook evaluation initiated the process. > > David Bailey > http://www.dbaileyconsultancy.co.uk > -- DrMajorBob at yahoo.com
- References:
- Re: Limiting the number of messages
- From: David Bailey <dave@removedbailey.co.uk>
- Re: Limiting the number of messages