SignalSet.st
author Stefan Vogel <sv@exept.de>
Wed, 28 Jul 1999 09:53:29 +0200
changeset 4464 cec93c942c14
parent 3311 2f7f489ebff8
child 4465 8dfbc6d6ccf3
permissions -rw-r--r--
Use context flag for exception handling instead of searching for selectors.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
     1
"
a27a279701f8 Initial revision
claus
parents:
diff changeset
     2
 COPYRIGHT (c) 1993 by Claus Gittinger
159
514c749165c3 *** empty log message ***
claus
parents: 95
diff changeset
     3
	      All Rights Reserved
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
     4
a27a279701f8 Initial revision
claus
parents:
diff changeset
     5
 This software is furnished under a license and may be used
a27a279701f8 Initial revision
claus
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
a27a279701f8 Initial revision
claus
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
a27a279701f8 Initial revision
claus
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
a27a279701f8 Initial revision
claus
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
a27a279701f8 Initial revision
claus
parents:
diff changeset
    10
 hereby transferred.
a27a279701f8 Initial revision
claus
parents:
diff changeset
    11
"
a27a279701f8 Initial revision
claus
parents:
diff changeset
    12
4464
cec93c942c14 Use context flag for exception handling instead of searching for
Stefan Vogel <sv@exept.de>
parents: 3311
diff changeset
    13
'From Smalltalk/X, Version:3.5.3 on 26-jul-1999 at 00:03:17'                    !
cec93c942c14 Use context flag for exception handling instead of searching for
Stefan Vogel <sv@exept.de>
parents: 3311
diff changeset
    14
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    15
IdentitySet subclass:#SignalSet
1275
2079f4776628 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 697
diff changeset
    16
	instanceVariableNames:''
2079f4776628 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 697
diff changeset
    17
	classVariableNames:'SetOfAnySignal'
2079f4776628 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 697
diff changeset
    18
	poolDictionaries:''
2079f4776628 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 697
diff changeset
    19
	category:'Kernel-Exceptions'
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    20
!
a27a279701f8 Initial revision
claus
parents:
diff changeset
    21
44
b262907c93ea *** empty log message ***
claus
parents: 41
diff changeset
    22
!SignalSet class methodsFor:'documentation'!
b262907c93ea *** empty log message ***
claus
parents: 41
diff changeset
    23
88
81dacba7a63a *** empty log message ***
claus
parents: 71
diff changeset
    24
copyright
81dacba7a63a *** empty log message ***
claus
parents: 71
diff changeset
    25
"
81dacba7a63a *** empty log message ***
claus
parents: 71
diff changeset
    26
 COPYRIGHT (c) 1993 by Claus Gittinger
159
514c749165c3 *** empty log message ***
claus
parents: 95
diff changeset
    27
	      All Rights Reserved
88
81dacba7a63a *** empty log message ***
claus
parents: 71
diff changeset
    28
81dacba7a63a *** empty log message ***
claus
parents: 71
diff changeset
    29
 This software is furnished under a license and may be used
81dacba7a63a *** empty log message ***
claus
parents: 71
diff changeset
    30
 only in accordance with the terms of that license and with the
81dacba7a63a *** empty log message ***
claus
parents: 71
diff changeset
    31
 inclusion of the above copyright notice.   This software may not
81dacba7a63a *** empty log message ***
claus
parents: 71
diff changeset
    32
 be provided or otherwise made available to, or used by, any
81dacba7a63a *** empty log message ***
claus
parents: 71
diff changeset
    33
 other person.  No title to or ownership of the software is
81dacba7a63a *** empty log message ***
claus
parents: 71
diff changeset
    34
 hereby transferred.
81dacba7a63a *** empty log message ***
claus
parents: 71
diff changeset
    35
"
81dacba7a63a *** empty log message ***
claus
parents: 71
diff changeset
    36
!
81dacba7a63a *** empty log message ***
claus
parents: 71
diff changeset
    37
44
b262907c93ea *** empty log message ***
claus
parents: 41
diff changeset
    38
documentation
b262907c93ea *** empty log message ***
claus
parents: 41
diff changeset
    39
"
71
a42874820e27 *** empty log message ***
claus
parents: 44
diff changeset
    40
    SignalSet allows catching of multiple signals. A SignalSet consists of
95
d22739a0c6e9 *** empty log message ***
claus
parents: 88
diff changeset
    41
    a number of signals and also implements the #handle:do: and #catch: methods
d22739a0c6e9 *** empty log message ***
claus
parents: 88
diff changeset
    42
    just as signals do. 
d22739a0c6e9 *** empty log message ***
claus
parents: 88
diff changeset
    43
    However, any signal from the SignalSet will, if signalled, lead into the handler.
159
514c749165c3 *** empty log message ***
claus
parents: 95
diff changeset
    44
71
a42874820e27 *** empty log message ***
claus
parents: 44
diff changeset
    45
    There is also a special signalSet, which can be used to catch any
159
514c749165c3 *** empty log message ***
claus
parents: 95
diff changeset
    46
    signal in the system - but this should no longer be used, since catching
514c749165c3 *** empty log message ***
claus
parents: 95
diff changeset
    47
    Object>>errorSignal has now the same effect.
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    48
71
a42874820e27 *** empty log message ***
claus
parents: 44
diff changeset
    49
    For more detail, see comment in Signal and examples in doc/coding.
95
d22739a0c6e9 *** empty log message ***
claus
parents: 88
diff changeset
    50
159
514c749165c3 *** empty log message ***
claus
parents: 95
diff changeset
    51
    Notice: SignalSets are not needed when a group of children of a common signal
514c749165c3 *** empty log message ***
claus
parents: 95
diff changeset
    52
    (such as arithmeticSignal) is to be handled; the parent signal of those will
514c749165c3 *** empty log message ***
claus
parents: 95
diff changeset
    53
    also handle all children.
514c749165c3 *** empty log message ***
claus
parents: 95
diff changeset
    54
    Use signalSets if totally unrelated signals should be handled by one common
514c749165c3 *** empty log message ***
claus
parents: 95
diff changeset
    55
    handler.
1275
2079f4776628 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 697
diff changeset
    56
2079f4776628 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 697
diff changeset
    57
1292
89497fff7f87 documentation
Claus Gittinger <cg@exept.de>
parents: 1275
diff changeset
    58
    [author:]
89497fff7f87 documentation
Claus Gittinger <cg@exept.de>
parents: 1275
diff changeset
    59
        Claus Gittinger
89497fff7f87 documentation
Claus Gittinger <cg@exept.de>
parents: 1275
diff changeset
    60
1275
2079f4776628 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 697
diff changeset
    61
    [see also:]
2079f4776628 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 697
diff changeset
    62
        Exception 
2079f4776628 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 697
diff changeset
    63
        Signal QuerySignal
2079f4776628 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 697
diff changeset
    64
        Object
44
b262907c93ea *** empty log message ***
claus
parents: 41
diff changeset
    65
"
b262907c93ea *** empty log message ***
claus
parents: 41
diff changeset
    66
! !
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    67
a27a279701f8 Initial revision
claus
parents:
diff changeset
    68
!SignalSet class methodsFor:'instance creation'!
a27a279701f8 Initial revision
claus
parents:
diff changeset
    69
a27a279701f8 Initial revision
claus
parents:
diff changeset
    70
anySignal
159
514c749165c3 *** empty log message ***
claus
parents: 95
diff changeset
    71
    "return a special signalSet for catching any signal.
2283
a1b388277558 commentary
Claus Gittinger <cg@exept.de>
parents: 1292
diff changeset
    72
     Questionable:
a1b388277558 commentary
Claus Gittinger <cg@exept.de>
parents: 1292
diff changeset
    73
        you should use 'Object>>errorSignal' for that purpose;
a1b388277558 commentary
Claus Gittinger <cg@exept.de>
parents: 1292
diff changeset
    74
        however, the anySignal-set also catches nonChilds of the ErrorSignal
a1b388277558 commentary
Claus Gittinger <cg@exept.de>
parents: 1292
diff changeset
    75
        (i.e. highly private, strange signals)."
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    76
44
b262907c93ea *** empty log message ***
claus
parents: 41
diff changeset
    77
    SetOfAnySignal isNil ifTrue:[
2283
a1b388277558 commentary
Claus Gittinger <cg@exept.de>
parents: 1292
diff changeset
    78
        SetOfAnySignal := self basicNew
44
b262907c93ea *** empty log message ***
claus
parents: 41
diff changeset
    79
    ].
b262907c93ea *** empty log message ***
claus
parents: 41
diff changeset
    80
    ^ SetOfAnySignal
2283
a1b388277558 commentary
Claus Gittinger <cg@exept.de>
parents: 1292
diff changeset
    81
a1b388277558 commentary
Claus Gittinger <cg@exept.de>
parents: 1292
diff changeset
    82
    "Modified: 27.1.1997 / 20:31:08 / cg"
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    83
! !
a27a279701f8 Initial revision
claus
parents:
diff changeset
    84
622
a17084b7ac06 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    85
!SignalSet methodsFor:'queries'!
a17084b7ac06 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    86
a17084b7ac06 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    87
accepts:aSignal
a17084b7ac06 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    88
    "return true, if the receiver accepts the argument, aSignal.
a17084b7ac06 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    89
     (i.e. if any of the receivers elements is aSignal or a parent of it).
a17084b7ac06 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    90
     False otherwise. The special anySet accepts any (non-query) signal."
a17084b7ac06 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    91
a17084b7ac06 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    92
    (self == SetOfAnySignal) ifTrue:[^ aSignal isQuerySignal not].
a17084b7ac06 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    93
    self do:[:sig | (sig accepts:aSignal) ifTrue:[^ true]].
a17084b7ac06 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    94
    ^ false
a17084b7ac06 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    95
!
a17084b7ac06 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    96
4464
cec93c942c14 Use context flag for exception handling instead of searching for
Stefan Vogel <sv@exept.de>
parents: 3311
diff changeset
    97
handlerForSignal:signal context:theContext originator:originator
cec93c942c14 Use context flag for exception handling instead of searching for
Stefan Vogel <sv@exept.de>
parents: 3311
diff changeset
    98
    "answer the handler block for the signal from originator.
cec93c942c14 Use context flag for exception handling instead of searching for
Stefan Vogel <sv@exept.de>
parents: 3311
diff changeset
    99
     The block is retrieved from aContext.
cec93c942c14 Use context flag for exception handling instead of searching for
Stefan Vogel <sv@exept.de>
parents: 3311
diff changeset
   100
     Answer nil if the signal is not handled"
cec93c942c14 Use context flag for exception handling instead of searching for
Stefan Vogel <sv@exept.de>
parents: 3311
diff changeset
   101
cec93c942c14 Use context flag for exception handling instead of searching for
Stefan Vogel <sv@exept.de>
parents: 3311
diff changeset
   102
cec93c942c14 Use context flag for exception handling instead of searching for
Stefan Vogel <sv@exept.de>
parents: 3311
diff changeset
   103
    (theContext selector ~~ #'handle:from:do:'
cec93c942c14 Use context flag for exception handling instead of searching for
Stefan Vogel <sv@exept.de>
parents: 3311
diff changeset
   104
     or:[(theContext argAt:2) == originator]) ifTrue:[
cec93c942c14 Use context flag for exception handling instead of searching for
Stefan Vogel <sv@exept.de>
parents: 3311
diff changeset
   105
        (self accepts:signal) ifTrue:[
cec93c942c14 Use context flag for exception handling instead of searching for
Stefan Vogel <sv@exept.de>
parents: 3311
diff changeset
   106
            ^ theContext argAt:1
cec93c942c14 Use context flag for exception handling instead of searching for
Stefan Vogel <sv@exept.de>
parents: 3311
diff changeset
   107
        ]
cec93c942c14 Use context flag for exception handling instead of searching for
Stefan Vogel <sv@exept.de>
parents: 3311
diff changeset
   108
    ].
cec93c942c14 Use context flag for exception handling instead of searching for
Stefan Vogel <sv@exept.de>
parents: 3311
diff changeset
   109
cec93c942c14 Use context flag for exception handling instead of searching for
Stefan Vogel <sv@exept.de>
parents: 3311
diff changeset
   110
    ^ nil
cec93c942c14 Use context flag for exception handling instead of searching for
Stefan Vogel <sv@exept.de>
parents: 3311
diff changeset
   111
cec93c942c14 Use context flag for exception handling instead of searching for
Stefan Vogel <sv@exept.de>
parents: 3311
diff changeset
   112
    "Created: / 25.7.1999 / 23:46:48 / stefan"
cec93c942c14 Use context flag for exception handling instead of searching for
Stefan Vogel <sv@exept.de>
parents: 3311
diff changeset
   113
!
cec93c942c14 Use context flag for exception handling instead of searching for
Stefan Vogel <sv@exept.de>
parents: 3311
diff changeset
   114
622
a17084b7ac06 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   115
includes:aSignal
a17084b7ac06 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   116
    "return true, if the receiver contains the argument, aSignal.
a17084b7ac06 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   117
     The special any-Set includes every (non-query) signal."
a17084b7ac06 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   118
a17084b7ac06 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   119
    (self == SetOfAnySignal) ifTrue:[
a17084b7ac06 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   120
	^ (aSignal isSignal and:[aSignal isQuerySignal not])
a17084b7ac06 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   121
    ].
a17084b7ac06 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   122
    ^ super includes:aSignal
a17084b7ac06 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   123
! !
a17084b7ac06 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   124
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   125
!SignalSet methodsFor:'save evaluation'!
a27a279701f8 Initial revision
claus
parents:
diff changeset
   126
622
a17084b7ac06 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   127
catch:aBlock
a17084b7ac06 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   128
     "evaluate the argument, aBlock.
a17084b7ac06 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   129
      If any of the signals in the receiver is raised during evaluation, 
a17084b7ac06 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   130
      abort the evaluation and return true; otherwise return false. 
a17084b7ac06 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   131
      With the special anySignal, evaluation can be performed totally save 
a17084b7ac06 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   132
      from signals 
a17084b7ac06 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   133
      - but who (beside radical c++ fans) would do that ?"
a17084b7ac06 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   134
a17084b7ac06 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   135
      |raiseOccurred|
a17084b7ac06 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   136
a17084b7ac06 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   137
      raiseOccurred := false.
a17084b7ac06 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   138
      self handle:[:ex | raiseOccurred := true. ex return] do:aBlock.
a17084b7ac06 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   139
      ^ raiseOccurred
a17084b7ac06 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   140
a17084b7ac06 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   141
      "
a17084b7ac06 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   142
       SignalSet anySignal catch:[
a17084b7ac06 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   143
	  (#(1 2 3 4) at:5) / 0.0
a17084b7ac06 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   144
       ]
a17084b7ac06 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   145
      "
a17084b7ac06 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   146
!
a17084b7ac06 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
   147
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   148
handle:handleBlock do:aBlock
a27a279701f8 Initial revision
claus
parents:
diff changeset
   149
    "evaluate the argument, aBlock.
a27a279701f8 Initial revision
claus
parents:
diff changeset
   150
     If any of the signals in the receiver is raised during evaluation,
a27a279701f8 Initial revision
claus
parents:
diff changeset
   151
     evaluate the handleBlock passing it an Exception argument.
a27a279701f8 Initial revision
claus
parents:
diff changeset
   152
     The handler may decide how to react to the signal by sending
a27a279701f8 Initial revision
claus
parents:
diff changeset
   153
     a corresponding message to the exception (see there).
a27a279701f8 Initial revision
claus
parents:
diff changeset
   154
     If the signal is not raised, return the value of evaluating
a27a279701f8 Initial revision
claus
parents:
diff changeset
   155
     aBlock."
a27a279701f8 Initial revision
claus
parents:
diff changeset
   156
4464
cec93c942c14 Use context flag for exception handling instead of searching for
Stefan Vogel <sv@exept.de>
parents: 3311
diff changeset
   157
     thisContext markForHandle.
3308
a6848d4b875d Comments
Stefan Vogel <sv@exept.de>
parents: 2284
diff changeset
   158
     ^ aBlock value  "the real logic is in Exception>>doRaise"
95
d22739a0c6e9 *** empty log message ***
claus
parents: 88
diff changeset
   159
d22739a0c6e9 *** empty log message ***
claus
parents: 88
diff changeset
   160
      "
d22739a0c6e9 *** empty log message ***
claus
parents: 88
diff changeset
   161
       SignalSet anySignal handle:[:ex |
3308
a6848d4b875d Comments
Stefan Vogel <sv@exept.de>
parents: 2284
diff changeset
   162
          ex errorString print. ' occured in: ' print. ex suspendedContext printNL.
a6848d4b875d Comments
Stefan Vogel <sv@exept.de>
parents: 2284
diff changeset
   163
          ex return
95
d22739a0c6e9 *** empty log message ***
claus
parents: 88
diff changeset
   164
       ] do:[
3308
a6848d4b875d Comments
Stefan Vogel <sv@exept.de>
parents: 2284
diff changeset
   165
          (#(1 2 3 4) at:5) / 0.0
95
d22739a0c6e9 *** empty log message ***
claus
parents: 88
diff changeset
   166
       ]
d22739a0c6e9 *** empty log message ***
claus
parents: 88
diff changeset
   167
      "
3308
a6848d4b875d Comments
Stefan Vogel <sv@exept.de>
parents: 2284
diff changeset
   168
4464
cec93c942c14 Use context flag for exception handling instead of searching for
Stefan Vogel <sv@exept.de>
parents: 3311
diff changeset
   169
    "Modified: / 26.7.1999 / 00:03:13 / stefan"
44
b262907c93ea *** empty log message ***
claus
parents: 41
diff changeset
   170
!
b262907c93ea *** empty log message ***
claus
parents: 41
diff changeset
   171
362
claus
parents: 259
diff changeset
   172
handle:handleBlock from:anObject do:aBlock
claus
parents: 259
diff changeset
   173
    "evaluate the argument, aBlock.
claus
parents: 259
diff changeset
   174
     If any of the signals in the receiver is raised during evaluation,
claus
parents: 259
diff changeset
   175
     and the exception originated from anObject,
claus
parents: 259
diff changeset
   176
     evaluate the handleBlock passing it an Exception argument.
claus
parents: 259
diff changeset
   177
     The handler may decide how to react to the signal by sending
claus
parents: 259
diff changeset
   178
     a corresponding message to the exception (see there).
claus
parents: 259
diff changeset
   179
     If the signal is not raised, return the value of evaluating
claus
parents: 259
diff changeset
   180
     aBlock."
claus
parents: 259
diff changeset
   181
4464
cec93c942c14 Use context flag for exception handling instead of searching for
Stefan Vogel <sv@exept.de>
parents: 3311
diff changeset
   182
     thisContext markForHandle.
3308
a6848d4b875d Comments
Stefan Vogel <sv@exept.de>
parents: 2284
diff changeset
   183
     ^ aBlock value  "the real logic is in Exception>>doRaise"
a6848d4b875d Comments
Stefan Vogel <sv@exept.de>
parents: 2284
diff changeset
   184
4464
cec93c942c14 Use context flag for exception handling instead of searching for
Stefan Vogel <sv@exept.de>
parents: 3311
diff changeset
   185
    "Modified: / 26.7.1999 / 00:03:06 / stefan"
362
claus
parents: 259
diff changeset
   186
!
claus
parents: 259
diff changeset
   187
2284
8b29d42bb03d oops - renamed #ignore: to #ignoreIn:
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
   188
ignoreIn:aBlock
159
514c749165c3 *** empty log message ***
claus
parents: 95
diff changeset
   189
     "evaluate the argument, aBlock.
2284
8b29d42bb03d oops - renamed #ignore: to #ignoreIn:
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
   190
      Ignore the any signals from the receiver during evaluation - i.e. simply
159
514c749165c3 *** empty log message ***
claus
parents: 95
diff changeset
   191
      continue. This makes only sense for some signals, such as UserInterrupt
514c749165c3 *** empty log message ***
claus
parents: 95
diff changeset
   192
      or AbortSignals, because continuing after an exception without any cleanup
514c749165c3 *** empty log message ***
claus
parents: 95
diff changeset
   193
      will often lead to followup-errors."
514c749165c3 *** empty log message ***
claus
parents: 95
diff changeset
   194
514c749165c3 *** empty log message ***
claus
parents: 95
diff changeset
   195
      ^ self handle:[:ex | ex proceed] do:aBlock.
514c749165c3 *** empty log message ***
claus
parents: 95
diff changeset
   196
514c749165c3 *** empty log message ***
claus
parents: 95
diff changeset
   197
      "
3311
2f7f489ebff8 example comment
Claus Gittinger <cg@exept.de>
parents: 3308
diff changeset
   198
       SignalSet anySignal ignoreIn:[
2284
8b29d42bb03d oops - renamed #ignore: to #ignoreIn:
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
   199
          123 size open   
95
d22739a0c6e9 *** empty log message ***
claus
parents: 88
diff changeset
   200
       ]
d22739a0c6e9 *** empty log message ***
claus
parents: 88
diff changeset
   201
      "
2284
8b29d42bb03d oops - renamed #ignore: to #ignoreIn:
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
   202
3311
2f7f489ebff8 example comment
Claus Gittinger <cg@exept.de>
parents: 3308
diff changeset
   203
    "Created: / 27.1.1997 / 20:32:50 / cg"
2f7f489ebff8 example comment
Claus Gittinger <cg@exept.de>
parents: 3308
diff changeset
   204
    "Modified: / 4.3.1998 / 16:36:30 / cg"
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   205
! !
a27a279701f8 Initial revision
claus
parents:
diff changeset
   206
696
d11342e8b7ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 622
diff changeset
   207
!SignalSet class methodsFor:'documentation'!
d11342e8b7ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 622
diff changeset
   208
d11342e8b7ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 622
diff changeset
   209
version
4464
cec93c942c14 Use context flag for exception handling instead of searching for
Stefan Vogel <sv@exept.de>
parents: 3311
diff changeset
   210
    ^ '$Header: /cvs/stx/stx/libbasic/SignalSet.st,v 1.25 1999-07-28 07:53:29 stefan Exp $'
696
d11342e8b7ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 622
diff changeset
   211
! !