[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-smalltalk] catching exceptions...
From: |
Paolo Bonzini |
Subject: |
Re: [Help-smalltalk] catching exceptions... |
Date: |
Sun, 28 Jun 2009 21:21:53 +0200 |
User-agent: |
Thunderbird 2.0.0.17 (X11/20081009) |
Interestingly enough, the same question was answered in an Iliad thread...
A method that does what you want is present in Seaside:
Signal extend [
resumeContext [
^resumeBlock outerContext home
]
]
then you can do
[Notification signal]
on: Notification
do: [:ex | ex resumeContext backtrace]
Actually a nicer backtrace can be obtained with
Signal extend [
resumeContext [
| context |
context := resumeBlock outerContext home.
[context isInternalExceptionHandlingContext]
whileTrue: [context := context parentContext].
^context
]
]
I'm adding this to the standard library, though under the name
#signalingContext.
Paolo