Christoph Thiede uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-ct.1557.mcz
==================== Summary ====================
Name: Kernel-ct.1557 Author: ct Time: 2 March 2024, 6:57:26.957512 pm UUID: 6f373fc9-2314-3c4b-b252-07eb1d5e1f4b Ancestors: Kernel-ct.1556, Kernel-ct.1442, Kernel-ct.1410, Kernel-ct.1385
Merge commit.
Kernel-ct.1410: Makes IllegalResumeAttempt an error. Revision: Makes IllegalResumeAttempt resumable. See: http://lists.squeakfoundation.org/pipermail/squeak-dev/2021-May/215520.html
Kernel-ct.1385 & Kernel-ct.1442: Improves multilingual support in common error messages on Object & others.
=============== Diff against Kernel-ct.1556 ===============
Item was changed: ----- Method: AdditionalMethodState>>copyWith: (in category 'copying') ----- copyWith: aPropertyOrPragma "<Association|Pragma>" "Answer a copy of the receiver which includes aPropertyOrPragma" | bs copy | (Association == aPropertyOrPragma class or: [Pragma == aPropertyOrPragma class]) ifFalse: + [self error: ('{1} instances should hold only Associations or Pragmas.' translated format: {self class name})]. - [self error: self class name, ' instances should hold only Associations or Pragmas.']. "no need to initialize here; we're copying all inst vars" copy := self class basicNew: (bs := self basicSize) + 1. 1 to: bs do: [:i| copy basicAt: i put: (self basicAt: i) shallowCopy]. copy basicAt: bs + 1 put: aPropertyOrPragma. 1 to: self class instSize do: [:i| copy instVarAt: i put: (self instVarAt: i)]. ^copy!
Item was changed: + Error subclass: #IllegalResumeAttempt - Exception subclass: #IllegalResumeAttempt instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'Kernel-Exceptions'!
!IllegalResumeAttempt commentStamp: '<historical>' prior: 0! This class is private to the EHS implementation. An instance of it is signaled whenever an attempt is made to resume from an exception which answers false to #isResumable.!
Item was removed: - ----- Method: IllegalResumeAttempt>>defaultAction (in category 'handling') ----- - defaultAction - "No one has handled this error, but now give them a chance to decide how to debug it. If none handle this either then open debugger (see UnhandedError-defaultAction)" - - UnhandledError signalForException: self!
Item was changed: + ----- Method: IllegalResumeAttempt>>isResumable (in category 'priv handling') ----- - ----- Method: IllegalResumeAttempt>>isResumable (in category 'handling') ----- isResumable + + ^ true! - - ^ false!
Item was removed: - ----- Method: IllegalResumeAttempt>>readMe (in category 'comment') ----- - readMe - - "Never handle this exception!!"!
Item was changed: ----- Method: Object>>assert: (in category 'error handling') ----- assert: aBlock "Throw an assertion error if aBlock does not evaluates to true."
+ aBlock value ifFalse: [AssertionFailure signal: 'Assertion failed' translated]! - aBlock value ifFalse: [AssertionFailure signal: 'Assertion failed']!
Item was changed: ----- Method: Object>>backwardCompatibilityOnly: (in category 'error handling') ----- backwardCompatibilityOnly: explanationString "Warn that the sending method has been deprecated. Methods that are tagt with #backwardCompatibility: are kept for compatibility."
Deprecation signalForContext: thisContext sender + message: ' (but will be kept for compatibility)' translated - message: ' (but will be kept for compatibility)' explanation: explanationString!
Item was changed: ----- Method: Object>>caseError (in category 'error handling') ----- caseError "Report an error from an in-line or explicit case statement."
+ self error: ('Case not found ({1}), and no otherwise clause' translated format: {self printString})! - self error: ('Case not found ({1}), and no otherwise clause' format: {self printString})!
Item was changed: ----- Method: Object>>doesNotUnderstand: (in category 'error handling') ----- doesNotUnderstand: aMessage "Handle the fact that there was an attempt to send the given message to the receiver but the receiver does not understand this message (typically sent from the machine when a message is sent to the receiver and no method is defined for that selector).
Raise the MessageNotUnderstood signal. If it is caught, answer the result supplied by the exception handler. If it is not caught, answer the result of resending the message within a guard for infinite recursion. This allows, for example, the programmer to implement the method and continue."
"Testing: (3 activeProcess)"
| exception resumeValue | (exception := MessageNotUnderstood new) message: aMessage; receiver: self. resumeValue := exception signal. ^exception reachedDefaultHandler "i.e. exception was not caught..." ifTrue: [[aMessage sentTo: self] on: MessageNotUnderstood do: [:ex| (self == ex receiver and: [aMessage hasIdenticalContentsAs: ex message]) ifFalse: [ex pass]. + self error: 'infinite recursion in doesNotUnderstand:' translated]] - self error: 'infinite recursion in doesNotUnderstand:']] ifFalse: [resumeValue]!
Item was changed: ----- Method: Object>>error (in category 'error handling') ----- error "Throw a generic Error exception."
+ ^self error: 'Error!!' translated.! - ^self error: 'Error!!'.!
Item was changed: ----- Method: Object>>errorImproperStore (in category 'private') ----- errorImproperStore "Create an error notification that an improper store was attempted."
+ ^ self error: 'Improper store into indexable object' translated! - self error: 'Improper store into indexable object'!
Item was changed: ----- Method: Object>>errorNonIntegerIndex (in category 'private') ----- errorNonIntegerIndex "Create an error notification that an improper object was used as an index."
+ ^ self error: 'Only integers should be used as indices' translated! - self error: 'only integers should be used as indices'!
Item was changed: ----- Method: Object>>errorSubscriptBounds: (in category 'private') ----- errorSubscriptBounds: index "Create an error notification that an improper integer was used as an index."
+ ^ self error: ('Subscript is out of bounds: {1}' translated format: {index})! - self error: 'subscript is out of bounds: ' , index printString!
Item was changed: ----- Method: Object>>instVarNamed: (in category 'system primitives') ----- instVarNamed: aString "Return the value of the instance variable in me with that name. Slow and unclean, but very useful. "
^ self instVarAt: (self class instVarIndexFor: aString asString + ifAbsent: [self error: 'no such inst var' translated]) - ifAbsent: [self error: 'no such inst var'])
!
Item was changed: ----- Method: Object>>instVarNamed:put: (in category 'system primitives') ----- instVarNamed: aString put: aValue "Store into the value of the instance variable in me of that name. Slow and unclean, but very useful. "
^self instVarAt: (self class instVarIndexFor: aString asString + ifAbsent: [self error: 'no such inst var' translated]) - ifAbsent: [self error: 'no such inst var']) put: aValue !
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}' translated format: {self className. thisContext sender selector})! - ^ NotImplemented signal: ('{1} or a superclass should implement {2}' format: {self className. thisContext sender selector})!
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}' translated format: {thisContext sender selector. self className}).! - NotImplemented signal: ('{1} is not a message appropriate for a {2}' format: {thisContext sender selector. self className}).!
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}' + translated format: {self className. thisContext sender selector}).! - format: {self className. thisContext sender selector}).!
Item was changed: ----- Method: Object>>traitConflict (in category 'error handling') ----- traitConflict + self error: 'A class or trait does not properly resolve a conflict between multiple traits it uses.' translated! - self error: 'A class or trait does not properly resolve a conflict between multiple traits it uses.'!
squeak-dev@lists.squeakfoundation.org