[Pkg] The Trunk: Kernel-ct.1251.mcz

commits at source.squeak.org commits at source.squeak.org
Sun Aug 4 09:02:35 UTC 2019


Marcel Taeumel uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-ct.1251.mcz

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

Name: Kernel-ct.1251
Author: ct
Time: 30 July 2019, 6:43:00.244625 pm
UUID: 86bd73cc-a91c-3644-82f4-3efa8777333d
Ancestors: Kernel-mt.1250

Convenience methods for exception handling

=============== Diff against Kernel-mt.1250 ===============

Item was added:
+ ----- Method: BlockClosure>>on:ensure: (in category 'exceptions') -----
+ on: exceptionOrExceptionSet ensure: aBlock
+ 
+ 	^ self
+ 		on: exceptionOrExceptionSet
+ 		do: [:exception | 
+ 			aBlock value.
+ 			exception pass]!

Item was added:
+ ----- Method: BlockClosure>>onInterruptEnsure: (in category 'exceptions') -----
+ onInterruptEnsure: aBlock
+ 	"Evaluate myself, evaluate aBlock if any error was thrown or the thread is going to be terminated"
+ 
+ 	| success result |
+ 	success := false.
+ 	[result := self value.
+ 	 success := true]
+ 		ensure: [success ifFalse: aBlock].
+ 	^ result!



More information about the Packages mailing list