Oh, but it's just that (ex outer) will pass the exception to an upper level outer "Evaluate the enclosing exception action and return to here instead of signal if it resumes (see #resumeUnchecked:)." | prevOuterContext | self isResumable ifTrue: [ prevOuterContext := outerContext. outerContext := thisContext contextTag ]. self pass. Nicolas 2012/1/16 Nicolas Cellier <nicolas.cellier.aka.nice@gmail.com>:
It's more tricky than that... Try this one that works:
|file| [ file := StandardFileStream fileNamed: 'loglog.txt'. file nextPutAll: 'Start'. [ file nextPutAll: (Compiler evaluate: '55 + 88 poipuiu') asString] on: Error do: [:ex | file nextPutAll: 'failed']. ] ensure: [file close].
Nicolas
2012/1/16 Max Leske <maxleske@gmail.com>:
Looks like Compiler might use it's own error handler?
Max
On Mon, Jan 16, 2012 at 7:08 PM, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
Hi guys
when I do the following
|file| [ file := StandardFileStream fileNamed: 'loglog.txt'. file nextPutAll: 'Start'. [ file nextPutAll: (Compiler evaluate: '55 + 88 poipuiu') asString] on: Error do: [:ex | ex outer errorReportOn: file]. ] ensure: [file close].
I get a pop up DNU poipuiu while I would like to get the stack on the stream.
May be my mistake is obvious but I do not see it.
Stef