[squeak-dev] The Inbox: Morphic-ct.1638.mcz
commits at source.squeak.org
commits at source.squeak.org
Mon Mar 2 11:23:27 UTC 2020
Christoph Thiede uploaded a new version of Morphic to project The Inbox:
http://source.squeak.org/inbox/Morphic-ct.1638.mcz
==================== Summary ====================
Name: Morphic-ct.1638
Author: ct
Time: 2 March 2020, 12:23:17.762949 pm
UUID: ade6a3af-6505-5e49-816d-b9940db95e25
Ancestors: Morphic-ct.1636
Slightly refines previous commit. Depends indeed on Morphic-ct.1636.
(Sorry for all the noise! We could really need some kind of branch concept ...)
=============== Diff against Morphic-ct.1636 ===============
Item was changed:
----- Method: WorldState>>doSafely:onErrorThat:setErrorFlag:ifFatal:afterErrorDo: (in category 'update cycle') -----
doSafely: aBlock onErrorThat: errorPredicate setErrorFlag: errorFlag ifFatal: fatalErrorBlock afterErrorDo: postErrorBlock
"Evaluate aBlock and keep track of errors during morph invocations."
| finished classesWithErrors |
finished := false.
classesWithErrors := IdentitySet new.
[finished] whileFalse: [
[aBlock value. finished := true] on: Error, Halt, Warning do: [:ex |
| err rcvr errCtxt errMorph |
(errorPredicate cull: ex)
ifFalse: [ex pass].
err := ex description.
rcvr := ex receiver.
errCtxt := thisContext.
[
errCtxt := errCtxt sender.
"Search the sender chain to find the morph causing the problem"
[errCtxt notNil and: [(errCtxt receiver isMorph) not]]
whileTrue: [errCtxt := errCtxt sender].
"If we're at the root of the context chain then we have a fatal problem"
errCtxt ifNil: [^ fatalErrorBlock cull: err].
errMorph := errCtxt receiver.
"If the morph causing the problem has already the error flag set, then search for the next morph above in the caller chain."
errMorph hasProperty: errorFlag
] whileTrue.
+ errMorph
+ setProperty: errorFlag toValue: true;
+ changed.
- errMorph setProperty: errorFlag toValue: true.
"Catch all errors, one for each receiver class."
(classesWithErrors includes: rcvr class) ifFalse: [
classesWithErrors add: rcvr class.
ToolSet debugException: ex].
postErrorBlock cull: err.
]].!
Item was changed:
----- Method: WorldState>>processEventsSafely: (in category 'update cycle') -----
processEventsSafely: aHandMorph
^ self
doSafely: [aHandMorph processEvents]
+ onErrorThat: [:error | ActiveEvent isNil or: [ActiveEvent isHighFrequentEvent]]
- onErrorThat: [:error | ActiveEvent isHighFrequentEvent]
setErrorFlag: #errorOnEvent
ifFatal: [:error | Project current fatalEventHandlingError: error]
afterErrorDo: []!
More information about the Squeak-dev
mailing list
|