[squeak-dev] The Inbox: Kernel-ar.540.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Jan 8 19:32:02 UTC 2011


A new version of Kernel was added to project The Inbox:
http://source.squeak.org/inbox/Kernel-ar.540.mcz

==================== Summary ====================

Name: Kernel-ar.540
Author: ar
Time: 8 January 2011, 8:31:35.805 pm
UUID: 92a65040-96e4-ce4c-9cce-7e4009693af5
Ancestors: Kernel-cmm.539

A fix for handling nested exceptions properly. Addresses ExceptionTests>>testHandlerFromAction.

=============== Diff against Kernel-cmm.539 ===============

Item was changed:
  ----- Method: ContextPart>>handleSignal: (in category 'private-exceptions') -----
  handleSignal: exception
  	"Sent to handler (on:do:) contexts only.  If my exception class (first arg) handles exception then execute my handle block (second arg), otherwise forward this message to the next handler context.  If none left, execute exception's defaultAction (see nil>>handleSignal:)."
  
  	| val |
  	(((self tempAt: 1) handles: exception) and: [self tempAt: 3]) ifFalse: [
+ 		val := self tempAt: 3.
+ 		^[self tempAt: 3 put: false.
+ 		self nextHandlerContext handleSignal: exception] ensure:[self tempAt: 3 put: val]].
- 		^ self nextHandlerContext handleSignal: exception].
  
  	exception privHandlerContext: self contextTag.
  	self tempAt: 3 put: false.  "disable self while executing handle block"
  	val := [(self tempAt: 2) cull: exception ]
  		ensure: [self tempAt: 3 put: true].
  	self return: val.  "return from self if not otherwise directed in handle block"
  !




More information about the Squeak-dev mailing list