[self-interest] Debugging in the presence of error blocks

Russell Allen mail at russell-allen.com
Wed Sep 18 01:35:04 UTC 2013


Without thinking about it too much, would 

doSomething: 'something' IfFail: [halt]

work differently?


On 18/09/2013, at 10:57 AM, Chris Double <chris.double at double.co.nz> wrote:

> I'm having issues with debugging and wonder if anyone as any tips. When
> running code that uses error blocks, like this:
> 
> doSomething: 'something' IfFail: [|:e| error: e ]
> 
> If the method has an error and calls the error block in IfFail then the
> debugger pops up with a stack that stops at the line where the error
> blocks is created (ie. the one above). It doesn't show a stack inside
> 'doSomething:IfFail:' where the error actually occured.
> 
> Is there a way to recover this information? At the moment if I run some
> Self code that deep inside internals it does an [|:e| error: e] block
> then I lose the context of where the error actually occured and only get
> the context of where it is handled.
> 
> -- 
> http://www.bluishcoder.co.nz
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.selflanguage.org/pipermail/self-interest/attachments/20130918/5c91cb22/attachment.html>


More information about the Self-interest mailing list