Please note that the #on:when:do: proposal would be only one possible implementation. Another idea of mine was to expand ExceptionSets and implement the common exception protocol also on BlockClosure! Watch some rewritten examples based on a true image:
[self model merge]on: MCMergeResolutionRequest & [:request |request merger conflicts notEmpty]do: [:request | request resume: true].
[client unusedBytecode]on: MessageNotUnderstood& [:ex | ex receiver == client]& [:ex | ex message selector == #unusedBytecode]do: [self error: 'unusedBytecode'].
(original version of the latter was:references := [self resolvePackageSpecReferences: packageSpec gofer: gofer]on: [self class retryPackageResolution] & (Error , GoferRepositoryError)do: [:ex | retryCount < 2 ifTrue: [ex return: #()]on: [self class retryPackageResolution] & GoferRepositoryError.Transcript showln: 'gofer repository error: '; show: ex description printString; show: '...ignoring'.(repositoryError := ex) resume: #()].
references := [ self resolvePackageSpecReferences: packageSpec gofer: gofer ]on: Error , GoferRepositoryErrordo: [ :ex |self class retryPackageResolutionifFalse: [ ex pass ].retryCount >= 2ifTrue: [(ex isKindOf: GoferRepositoryError)ifTrue: [Transcript showln: 'gofer repository error: ' , ex description printString , '...ignoring'.repositoryError := ex.ex resume: #() ]ifFalse: [ ex pass ] ].ex return: #() ].
sz := 1024*1024*1024*1024.selfshould: [Array new: sz]raise: OutOfMemory, (Error & [:ex | ex messageTextincludesSubstring: 'basicNew: with invalid argument'])