That's odd.
It works fine here.
Can you show me a minimal test case?
The exception handler works fine both on top of node and in the browser
(they are different exception handlers)
What I did:
amber >> Error signal: 'oops'
a Repl>>eval:
a Compiler>>loadExpression:
a DoIt>>doIt
a BlockClosure>>value
Error>>signal:
oops
amber >> [Error signal: 'foo'] on: Error do: [:ex | Transcript show: ex]
a Error
Cheers,
Nico
On Mon, 2011-10-24 at 12:57 -0700, Stefan Krecher wrote:
> Hi,
> i'm implementing the cloud-package-thing (for persisting and serving
> Amber packages). It is an enhancement to Görans FileServer.st
> Because i'd like to generalize the calls to the server, i'm calling
> code like that: (Smalltalk current at: (params at: 1)) perform:
> (params at: 2) withArguments: {data}.
> With params holding the Classname and the method to get executed and
> data the JSON-Data for the method.
> This mechanism works fine but there seems to be a problem with
> Exceptions. When i do an Error signal: 'Buh!', i see the error logged
> in the node-console but it is neither caught by self try:[] catch:[]
> nor by [..] on: Error do: []
> I'm raising the error in a method called via the beforementioned
> reflective call.
> Am i missing something?
> regards,
> Stefan