Skip to content

Commit

Permalink
Avoid using #- on BlockClosure>>on:except:do: extension
Browse files Browse the repository at this point in the history
  • Loading branch information
ytsejam78 committed Aug 4, 2023
1 parent feb012a commit eb8618f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions source/Buoy-Exception-Handling/BlockClosure.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -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 ] ]
]

0 comments on commit eb8618f

Please sign in to comment.