[Seaside-dev] Seaside and exception behaviour

Dale Henrichs dhenrich at vmware.com
Mon Jan 10 17:46:13 UTC 2011


GemStone2.x gets 'Squeak' and GemStone3.x gets 'VW':)

In GemStone2.x ANSI exception behavior was added onto the existing 
(non-ANSI) exception handling framework.

In GemStone3.x we converted our exception handling framework to be 
ANSI-based...

Dale

On 01/05/2011 07:08 AM, mkobetic at cincom.com wrote:
> Here's maybe a bit more concise example. If you run the thing below in a workspace,
> it should return 'Squeak' in Squeak and 'VW' in VW
>
> [	[	[	self error: 'trigger error'
> 		] on: ZeroDivide do: [ :ex | 'Squeak' ]
> 	] on: Error do: [ :ex | 3 / 0 ]
> ] on: ZeroDivide do: [ :ex | 'VW' ]
>
> HTH,
>
> Martin
>
> "Alan Knight"<knight at acm.org>  wrote:
>> To more concretely illustrate what I'm talking about, consider defining
>> an exception class ExceptionOne. Then define a class First with a method
>> startHere
>>       "First new startHere"
>>       [Second new doStuff] on: Error do: [:ex | Transcript cr; show:
>> 'exception in startHere'. ExceptionOne signal].
>>
>> And a class Second, with
>> doStuff
>>       [self doMoreStuff] on: ExceptionOne do: [:ex | Transcript cr; show:
>> 'Exception in doStuff'].
>>
>> and
>>
>> doMoreStuff
>>       Transcript cr; show: 'Doing more stuff...'.
>>       3 / 0.
>>
>> In VisualWorks and VisualAge that results in an uncaught ExceptionOne
>> and a debugger. In Pharo 1.1 one-click it just prints 3 things to the
>> Transcript, the same behaviour I'd get in VisualWorks if I change the
>> startHere method to do "ex resiganlAs: ExceptionOne new"
>>
>> --
>> Alan Knight [|], Engineering Manager, Cincom Smalltalk
>> knight at acm.org
>> aknight at cincom.com
>> http://www.cincom.com/smalltalk
>>
>>
>> _______________________________________________
>> seaside-dev mailing list
>> seaside-dev at lists.squeakfoundation.org
>> http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
>>
>
> _______________________________________________
> seaside-dev mailing list
> seaside-dev at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev



More information about the seaside-dev mailing list