[squeak-dev] The Inbox: Kernel-fbs.732.mcz

commits at source.squeak.org commits at source.squeak.org
Sun Jan 27 11:24:48 UTC 2013


Frank Shearar uploaded a new version of Kernel to project The Inbox:
http://source.squeak.org/inbox/Kernel-fbs.732.mcz

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

Name: Kernel-fbs.732
Author: fbs
Time: 27 January 2013, 11:23:27.822 am
UUID: b9ad1255-fa5b-4480-ae3f-923fd0969ca8
Ancestors: Kernel-nice.731

#subclassResponsibility in-Debugger method creation #1 of 4: Raise a SubclassResponsibility when something sends #subclassResponsibility, recording the offending class, the selector, and the arguments to the selector. (The Debugger uses this information.)

=============== Diff against Kernel-nice.731 ===============

Item was changed:
  ----- Method: Object>>subclassResponsibility (in category 'error handling') -----
  subclassResponsibility
  	"This message sets up a framework for the behavior of the class' subclasses.
  	Announce that the subclass should have implemented this message."
+ 	| exception args senderCtxt |
+ 	"We must assign to a local variable so that the Debugger can access the exception through thisParticularContext tempAt: 1. This also means that the exception local must be the first local declared."
+ 	senderCtxt := thisContext sender.
+ 	 "Copy the temps out of senderCtxt"
+ 	args := OrderedCollection new.
+ 	1 to: senderCtxt selector numArgs do:
+ 		[:idx | args addLast: (senderCtxt tempAt: idx)].
+ 	exception := SubclassResponsibilityError
+ 		class: self class
+ 		selector: senderCtxt selector
+ 		arguments: args.
+ 	exception signal.!
- 
- 	self error: 'My subclass should have overridden ', thisContext sender selector printString!



More information about the Squeak-dev mailing list