[Pkg] The Trunk: Kernel-fbs.739.mcz
commits at source.squeak.org
commits at source.squeak.org
Thu Feb 7 22:39:26 UTC 2013
Frank Shearar uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-fbs.739.mcz
==================== Summary ====================
Name: Kernel-fbs.739
Author: fbs
Time: 7 February 2013, 10:38:28.822 pm
UUID: 39126c7c-4c6c-4902-b753-18e0979bab69
Ancestors: Kernel-dtl.733, Kernel-fbs.738
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-dtl.733 ===============
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 Packages
mailing list