ExceptionHandlerSet.st
branchjv
changeset 19478 1f5aa87f6170
parent 18045 c0c600e0d3b3
parent 19444 70d035d69cf1
child 20206 51652e7f46dd
equal deleted inserted replaced
19477:af82888ceb72 19478:1f5aa87f6170
     9  other person.  No title to or ownership of the software is
     9  other person.  No title to or ownership of the software is
    10  hereby transferred.
    10  hereby transferred.
    11 "
    11 "
    12 "{ Package: 'stx:libbasic' }"
    12 "{ Package: 'stx:libbasic' }"
    13 
    13 
       
    14 "{ NameSpace: Smalltalk }"
       
    15 
    14 IdentityDictionary subclass:#ExceptionHandlerSet
    16 IdentityDictionary subclass:#ExceptionHandlerSet
    15 	instanceVariableNames:''
    17 	instanceVariableNames:''
    16 	classVariableNames:''
    18 	classVariableNames:''
    17 	poolDictionaries:''
    19 	poolDictionaries:''
    18 	category:'Kernel-Exceptions'
    20 	category:'Kernel-Exceptions'
   140 
   142 
   141 !ExceptionHandlerSet methodsFor:'queries'!
   143 !ExceptionHandlerSet methodsFor:'queries'!
   142 
   144 
   143 accepts:anExceptionHandler
   145 accepts:anExceptionHandler
   144     "return true, if the receiver accepts the argument, aSignal.
   146     "return true, if the receiver accepts the argument, aSignal.
   145      (i.e. if any of the receivers elements is aSignal or a parent of it)."
   147      (i.e. if any of the receiver's elements is aSignal or a parent of it)."
   146 
   148 
   147     self keysDo:[:eachExceptionHandler | 
   149     self keysDo:[:eachExceptionHandler | 
   148         (eachExceptionHandler==anExceptionHandler 
   150         (eachExceptionHandler==anExceptionHandler 
   149          or:[eachExceptionHandler accepts:anExceptionHandler]) ifTrue:[^ true].
   151          or:[eachExceptionHandler accepts:anExceptionHandler]) ifTrue:[^ true].
   150     ].
   152     ].
   211 
   213 
   212 !
   214 !
   213 
   215 
   214 handles:anException
   216 handles:anException
   215     "return true, if the receiver handles the argument, anException.
   217     "return true, if the receiver handles the argument, anException.
   216      (i.e. if any of the receivers elements handles anException)."
   218      (i.e. if any of the receiver's elements handles anException)."
   217 
   219 
   218     self keysDo:[:eachExceptionHandler| 
   220     self keysDo:[:eachExceptionHandler| 
   219         (eachExceptionHandler handles:anException) ifTrue:[^ true]
   221         (eachExceptionHandler handles:anException) ifTrue:[^ true]
   220     ].
   222     ].
   221     ^ false
   223     ^ false
   332 
   334 
   333 
   335 
   334 !ExceptionHandlerSet class methodsFor:'documentation'!
   336 !ExceptionHandlerSet class methodsFor:'documentation'!
   335 
   337 
   336 version
   338 version
   337     ^ '$Header: /cvs/stx/stx/libbasic/ExceptionHandlerSet.st,v 1.18 2013-04-04 09:37:41 stefan Exp $'
   339     ^ '$Header$'
   338 !
   340 !
   339 
   341 
   340 version_SVN
   342 version_SVN
   341     ^ '$Id: ExceptionHandlerSet.st 10761 2012-01-19 11:46:00Z vranyj1 $'
   343     ^ '$Id: ExceptionHandlerSet.st 10761 2012-01-19 11:46:00Z vranyj1 $'
   342 ! !
   344 ! !