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

commits at source.squeak.org commits at source.squeak.org
Tue Feb 5 23:10:23 UTC 2013


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

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

Name: Kernel-fbs.738
Author: fbs
Time: 5 February 2013, 11:09:23.219 pm
UUID: 792498b5-658b-4286-a580-755e9ae392a0
Ancestors: Kernel-nice.731
Backported From: Kernel-fbs.737

Stay in the debugger for longer. Part 3 of _5_.

Stack introspection so the Debugger doesn't have to. Signal the new exceptions when necessary.

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

Item was added:
+ ----- Method: ContextPart>>asMessage (in category 'converting') -----
+ asMessage
+ 	| sender selector args |
+ 	sender := self sender.
+ 	selector := sender method selector.
+ 	args := Array new: selector numArgs.
+ 	1 to: selector numArgs do: [ :i | args at: i put: (sender tempAt: i)].
+ 	^ Message selector: selector arguments: args.!

Item was added:
+ ----- Method: ContextPart>>exceptionMessage (in category 'accessing') -----
+ exceptionMessage
+ 	^ self selector caseOf: {
+ 			[#doesNotUnderstand:] -> [self tempAt: 1].
+ 			[#notYetImplemented] -> [self asMessage].
+ 			[#shouldBeImplemented] -> [self asMessage].
+ 			[#subclassResponsibility] -> [self asMessage]}
+ 		otherwise: [self error: 'This context is not the result of a message exception.'].!

Item was added:
+ ----- Method: ContextPart>>selectorCategory (in category 'accessing') -----
+ selectorCategory
+ 	"Return the category to which this message belongs (relative to the receiver). If no superclass categorises this message, use the default."
+ 	| organizers |
+ 	organizers := self receiver class withAllSuperclasses collect: [:ea | ea organization].
+ 	organizers addFirst: self receiver class organization.
+ 	^ (organizers collect: [ :org | org categoryOfElement: self selector])
+ 			detect: [:ea | ea ~= ClassOrganizer default and: [ ea ~= nil]]
+ 			ifNone: [ClassOrganizer default]!

Item was added:
+ ----- Method: MessageSend>>asMessage (in category 'converting') -----
+ asMessage
+ 	^ Message selector: selector arguments: arguments.!

Item was changed:
  ----- Method: Object>>shouldBeImplemented (in category 'error handling') -----
  shouldBeImplemented
  	"Announce that this message should be implemented"
  
+ 	^ NotImplemented signal: ('{1} or a superclass should implement {2}' format: {self className. thisContext sender selector})!
- 	self error: 'This message should be implemented'!

Item was changed:
  ----- Method: Object>>shouldNotImplement (in category 'error handling') -----
  shouldNotImplement
  	"Announce that, although the receiver inherits this message, it should 
  	not implement it."
  
+ 	NotImplemented signal: ('{1} is not a message appropriate for a {2}' format: {thisContext sender selector. self className}).!
- 	self error: 'This message is not appropriate for this object'!

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."
+ 	^ SubclassResponsibility
+ 		signal: ('My {1} subclass should have overridden {2}'
+ 			format: {self className. thisContext sender selector}).!
- 
- 	self error: 'My subclass should have overridden ', thisContext sender selector printString!



More information about the Squeak-dev mailing list