ProceedError.st
author Stefan Vogel <sv@exept.de>
Tue, 28 Apr 2020 16:22:26 +0200
changeset 25375 b784fc06a5eb
parent 24789 9d284b4d8569
permissions -rw-r--r--
#REFACTORING by stefan class: KeyedCollection class added: #newWithCapacity:
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
24789
9d284b4d8569 #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 23471
diff changeset
     1
"{ Encoding: utf8 }"
9d284b4d8569 #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 23471
diff changeset
     2
4554
db264efac2c0 Add copyright.
Stefan Vogel <sv@exept.de>
parents: 4534
diff changeset
     3
"
db264efac2c0 Add copyright.
Stefan Vogel <sv@exept.de>
parents: 4534
diff changeset
     4
 COPYRIGHT (c) 1999 by eXept Software AG
db264efac2c0 Add copyright.
Stefan Vogel <sv@exept.de>
parents: 4534
diff changeset
     5
              All Rights Reserved
db264efac2c0 Add copyright.
Stefan Vogel <sv@exept.de>
parents: 4534
diff changeset
     6
db264efac2c0 Add copyright.
Stefan Vogel <sv@exept.de>
parents: 4534
diff changeset
     7
 This software is furnished under a license and may be used
db264efac2c0 Add copyright.
Stefan Vogel <sv@exept.de>
parents: 4534
diff changeset
     8
 only in accordance with the terms of that license and with the
db264efac2c0 Add copyright.
Stefan Vogel <sv@exept.de>
parents: 4534
diff changeset
     9
 inclusion of the above copyright notice.   This software may not
db264efac2c0 Add copyright.
Stefan Vogel <sv@exept.de>
parents: 4534
diff changeset
    10
 be provided or otherwise made available to, or used by, any
db264efac2c0 Add copyright.
Stefan Vogel <sv@exept.de>
parents: 4534
diff changeset
    11
 other person.  No title to or ownership of the software is
db264efac2c0 Add copyright.
Stefan Vogel <sv@exept.de>
parents: 4534
diff changeset
    12
 hereby transferred.
db264efac2c0 Add copyright.
Stefan Vogel <sv@exept.de>
parents: 4534
diff changeset
    13
"
6210
d7039e2ae776 caetgory change and documentation added
Claus Gittinger <cg@exept.de>
parents: 4554
diff changeset
    14
"{ Package: 'stx:libbasic' }"
d7039e2ae776 caetgory change and documentation added
Claus Gittinger <cg@exept.de>
parents: 4554
diff changeset
    15
20962
54b9f03e5aba #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 15111
diff changeset
    16
"{ NameSpace: Smalltalk }"
54b9f03e5aba #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 15111
diff changeset
    17
4528
5ef0de6abb50 initial checkin
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    18
Warning subclass:#ProceedError
5ef0de6abb50 initial checkin
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    19
	instanceVariableNames:''
5ef0de6abb50 initial checkin
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    20
	classVariableNames:''
5ef0de6abb50 initial checkin
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    21
	poolDictionaries:''
6210
d7039e2ae776 caetgory change and documentation added
Claus Gittinger <cg@exept.de>
parents: 4554
diff changeset
    22
	category:'Kernel-Exceptions-Errors'
4528
5ef0de6abb50 initial checkin
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    23
!
5ef0de6abb50 initial checkin
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    24
5ef0de6abb50 initial checkin
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    25
!ProceedError class methodsFor:'documentation'!
5ef0de6abb50 initial checkin
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    26
4554
db264efac2c0 Add copyright.
Stefan Vogel <sv@exept.de>
parents: 4534
diff changeset
    27
copyright
db264efac2c0 Add copyright.
Stefan Vogel <sv@exept.de>
parents: 4534
diff changeset
    28
"
db264efac2c0 Add copyright.
Stefan Vogel <sv@exept.de>
parents: 4534
diff changeset
    29
 COPYRIGHT (c) 1999 by eXept Software AG
db264efac2c0 Add copyright.
Stefan Vogel <sv@exept.de>
parents: 4534
diff changeset
    30
              All Rights Reserved
db264efac2c0 Add copyright.
Stefan Vogel <sv@exept.de>
parents: 4534
diff changeset
    31
db264efac2c0 Add copyright.
Stefan Vogel <sv@exept.de>
parents: 4534
diff changeset
    32
 This software is furnished under a license and may be used
db264efac2c0 Add copyright.
Stefan Vogel <sv@exept.de>
parents: 4534
diff changeset
    33
 only in accordance with the terms of that license and with the
db264efac2c0 Add copyright.
Stefan Vogel <sv@exept.de>
parents: 4534
diff changeset
    34
 inclusion of the above copyright notice.   This software may not
db264efac2c0 Add copyright.
Stefan Vogel <sv@exept.de>
parents: 4534
diff changeset
    35
 be provided or otherwise made available to, or used by, any
db264efac2c0 Add copyright.
Stefan Vogel <sv@exept.de>
parents: 4534
diff changeset
    36
 other person.  No title to or ownership of the software is
db264efac2c0 Add copyright.
Stefan Vogel <sv@exept.de>
parents: 4534
diff changeset
    37
 hereby transferred.
db264efac2c0 Add copyright.
Stefan Vogel <sv@exept.de>
parents: 4534
diff changeset
    38
"
db264efac2c0 Add copyright.
Stefan Vogel <sv@exept.de>
parents: 4534
diff changeset
    39
db264efac2c0 Add copyright.
Stefan Vogel <sv@exept.de>
parents: 4534
diff changeset
    40
db264efac2c0 Add copyright.
Stefan Vogel <sv@exept.de>
parents: 4534
diff changeset
    41
!
db264efac2c0 Add copyright.
Stefan Vogel <sv@exept.de>
parents: 4534
diff changeset
    42
4528
5ef0de6abb50 initial checkin
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    43
documentation
5ef0de6abb50 initial checkin
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    44
"
5ef0de6abb50 initial checkin
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    45
    ProceedError is raised to indicate that a handler tried to
5ef0de6abb50 initial checkin
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    46
    proceed an exception marked as nonproceedable.
5ef0de6abb50 initial checkin
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    47
5ef0de6abb50 initial checkin
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    48
    The parameter is the exception which tried to proceed.
5ef0de6abb50 initial checkin
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    49
24789
9d284b4d8569 #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 23471
diff changeset
    50
    NOTE: In the past, ST/X didn't distinguish between proceedable
9d284b4d8569 #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 23471
diff changeset
    51
          and non-proceedable exceptions. 
9d284b4d8569 #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 23471
diff changeset
    52
          To make transistion easier, this exception is a warning for now. 
9d284b4d8569 #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 23471
diff changeset
    53
          In a future release of ST/X, this exception might be changed to be an error 
4528
5ef0de6abb50 initial checkin
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    54
          (child of SignalError).
5ef0de6abb50 initial checkin
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    55
          Please fix your code.
5ef0de6abb50 initial checkin
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    56
"
5ef0de6abb50 initial checkin
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    57
! !
5ef0de6abb50 initial checkin
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    58
5ef0de6abb50 initial checkin
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    59
!ProceedError class methodsFor:'initialization'!
5ef0de6abb50 initial checkin
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    60
5ef0de6abb50 initial checkin
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    61
initialize
5ef0de6abb50 initial checkin
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    62
5ef0de6abb50 initial checkin
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    63
    NotifierString := 'handler tried to proceed from nonproceedable exception'.
5ef0de6abb50 initial checkin
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    64
5ef0de6abb50 initial checkin
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    65
    "
5ef0de6abb50 initial checkin
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    66
     self initialize
5ef0de6abb50 initial checkin
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    67
    "
5ef0de6abb50 initial checkin
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    68
5ef0de6abb50 initial checkin
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    69
5ef0de6abb50 initial checkin
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    70
! !
5ef0de6abb50 initial checkin
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    71
4534
648cf88a45db Add defaultAction
Stefan Vogel <sv@exept.de>
parents: 4528
diff changeset
    72
!ProceedError methodsFor:'default actions'!
648cf88a45db Add defaultAction
Stefan Vogel <sv@exept.de>
parents: 4528
diff changeset
    73
648cf88a45db Add defaultAction
Stefan Vogel <sv@exept.de>
parents: 4528
diff changeset
    74
defaultAction
24789
9d284b4d8569 #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 23471
diff changeset
    75
    "make proceeding from a non-proceedable print a warning for now.
9d284b4d8569 #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 23471
diff changeset
    76
     This may change in future revisions.
9d284b4d8569 #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 23471
diff changeset
    77
     cg: no, this will stay as it is."
4534
648cf88a45db Add defaultAction
Stefan Vogel <sv@exept.de>
parents: 4528
diff changeset
    78
23471
a4b177b12aa8 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 20962
diff changeset
    79
    |con|
a4b177b12aa8 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 20962
diff changeset
    80
a4b177b12aa8 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 20962
diff changeset
    81
    con := parameter suspendedContext.
a4b177b12aa8 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 20962
diff changeset
    82
    
24789
9d284b4d8569 #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 23471
diff changeset
    83
    ('WARNING: proceeding signal <', parameter creator printString, '>') errorPrintCR.
9d284b4d8569 #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 23471
diff changeset
    84
    ('         which was raised nonproceedable by: ', con printString) errorPrintCR.
23471
a4b177b12aa8 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 20962
diff changeset
    85
    con notNil ifTrue:[
24789
9d284b4d8569 #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 23471
diff changeset
    86
        ('    : ', con sender printString) errorPrintCR.
9d284b4d8569 #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 23471
diff changeset
    87
        ('    : ', con sender sender printString) errorPrintCR.
23471
a4b177b12aa8 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 20962
diff changeset
    88
    ].        
24789
9d284b4d8569 #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 23471
diff changeset
    89
    ('         in: ', suspendedContext printString , ' tries to proceed.') errorPrintCR.
9d284b4d8569 #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 23471
diff changeset
    90
    ('           : ', thisContext sender printString) errorPrintCR.
20962
54b9f03e5aba #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 15111
diff changeset
    91
    ('           : ', thisContext sender sender printString) errorPrintCR.
54b9f03e5aba #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 15111
diff changeset
    92
    ('           : ', thisContext sender sender sender printString) errorPrintCR.
24789
9d284b4d8569 #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 23471
diff changeset
    93
    "/ ('         This may be an error in future ST/X versions.') errorPrintCR.
4534
648cf88a45db Add defaultAction
Stefan Vogel <sv@exept.de>
parents: 4528
diff changeset
    94
648cf88a45db Add defaultAction
Stefan Vogel <sv@exept.de>
parents: 4528
diff changeset
    95
    self proceedWith:nil.
648cf88a45db Add defaultAction
Stefan Vogel <sv@exept.de>
parents: 4528
diff changeset
    96
648cf88a45db Add defaultAction
Stefan Vogel <sv@exept.de>
parents: 4528
diff changeset
    97
    "
648cf88a45db Add defaultAction
Stefan Vogel <sv@exept.de>
parents: 4528
diff changeset
    98
      Object errorSignal handle:[:ex|
648cf88a45db Add defaultAction
Stefan Vogel <sv@exept.de>
parents: 4528
diff changeset
    99
         ex proceedWith:nil
648cf88a45db Add defaultAction
Stefan Vogel <sv@exept.de>
parents: 4528
diff changeset
   100
      ] do:[
648cf88a45db Add defaultAction
Stefan Vogel <sv@exept.de>
parents: 4528
diff changeset
   101
         Object errorSignal raise
648cf88a45db Add defaultAction
Stefan Vogel <sv@exept.de>
parents: 4528
diff changeset
   102
      ].
648cf88a45db Add defaultAction
Stefan Vogel <sv@exept.de>
parents: 4528
diff changeset
   103
648cf88a45db Add defaultAction
Stefan Vogel <sv@exept.de>
parents: 4528
diff changeset
   104
      Object errorSignal handle:[:ex|
648cf88a45db Add defaultAction
Stefan Vogel <sv@exept.de>
parents: 4528
diff changeset
   105
         ex proceed
648cf88a45db Add defaultAction
Stefan Vogel <sv@exept.de>
parents: 4528
diff changeset
   106
      ] do:[
648cf88a45db Add defaultAction
Stefan Vogel <sv@exept.de>
parents: 4528
diff changeset
   107
         Object errorSignal raise
648cf88a45db Add defaultAction
Stefan Vogel <sv@exept.de>
parents: 4528
diff changeset
   108
      ].
648cf88a45db Add defaultAction
Stefan Vogel <sv@exept.de>
parents: 4528
diff changeset
   109
   "
20962
54b9f03e5aba #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 15111
diff changeset
   110
54b9f03e5aba #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 15111
diff changeset
   111
    "Modified: / 13-11-2016 / 10:52:37 / cg"
23471
a4b177b12aa8 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 20962
diff changeset
   112
    "Modified: / 26-10-2018 / 00:44:50 / Claus Gittinger"
4534
648cf88a45db Add defaultAction
Stefan Vogel <sv@exept.de>
parents: 4528
diff changeset
   113
! !
648cf88a45db Add defaultAction
Stefan Vogel <sv@exept.de>
parents: 4528
diff changeset
   114
4528
5ef0de6abb50 initial checkin
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   115
!ProceedError class methodsFor:'documentation'!
5ef0de6abb50 initial checkin
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   116
5ef0de6abb50 initial checkin
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   117
version
20962
54b9f03e5aba #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 15111
diff changeset
   118
    ^ '$Header$'
4528
5ef0de6abb50 initial checkin
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   119
! !
7586
63e4900c8931 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6210
diff changeset
   120
15111
017507dff46c class: ProceedError
Claus Gittinger <cg@exept.de>
parents: 7586
diff changeset
   121
4528
5ef0de6abb50 initial checkin
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   122
ProceedError initialize!