From eb8618f5ec5e69b2e26a1a1a57a2472cbea03671 Mon Sep 17 00:00:00 2001 From: Mariano Saura Date: Fri, 4 Aug 2023 16:03:54 -0300 Subject: [PATCH] Avoid using #- on BlockClosure>>on:except:do: extension --- source/Buoy-Exception-Handling/BlockClosure.extension.st | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/Buoy-Exception-Handling/BlockClosure.extension.st b/source/Buoy-Exception-Handling/BlockClosure.extension.st index bb54693..3edb1d5 100644 --- a/source/Buoy-Exception-Handling/BlockClosure.extension.st +++ b/source/Buoy-Exception-Handling/BlockClosure.extension.st @@ -4,6 +4,9 @@ Extension { #name : #BlockClosure } BlockClosure >> on: selector except: exclusionSelector do: action [ ^ self - on: selector - exclusionSelector - do: action + on: selector + do: [ :exception | + (exclusionSelector handles: exception) + ifTrue: [ exception pass ] + ifFalse: [ action value: exception ] ] ]