[ENH] HaltIf-md

denker at iam.unibe.ch denker at iam.unibe.ch
Fri Oct 15 12:21:54 UTC 2004


from preamble:

"Change Set:		HaltIf-md
Date:			15 October 2004
Author:			Marcus Denker

This changeset provides easy conditional halts.

You can do:

  self haltIf: expr.

or 

  self haltIf: [expr]

or

  self haltIf: #aSymbol.

If a symbol is used as a parameter, #haltIf will search the callchain
and halt
if any method's selector equals the symbol.

This is very useful when debugging code with extensive TestSuites: The
programmer can very easily specify a conditional halt that only is taken

when called from one specific test:

  self haltIf: #someTestThatWillCallThisMethod.

Another cool thing is that this allows to add a halt in methods that are
used by the System.
e.g. a halt in OrderedCollection>>#add will crash the system, but with a
haltIf #someMethod 
the System will keep on working (but somewhat slow). The halt is taken
as soon as #add is
called from #someMethod. 

"!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: HaltIf-md.cs.gz
Type: application/octet-stream
Size: 3932 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20041015/cf62a80c/HaltIf-md.cs.obj


More information about the Squeak-dev mailing list