ProceedError.st
author Stefan Vogel <sv@exept.de>
Wed, 04 Aug 1999 16:35:58 +0200
changeset 4534 648cf88a45db
parent 4528 5ef0de6abb50
child 4554 db264efac2c0
permissions -rw-r--r--
Add defaultAction

Warning subclass:#ProceedError
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'Kernel-Exceptions'
!

!ProceedError class methodsFor:'documentation'!

documentation
"
    ProceedError is raised to indicate that a handler tried to
    proceed an exception marked as nonproceedable.

    The parameter is the exception which tried to proceed.

    NOTE: In the past ST/X didn't distinguish between proceedable
          and non-proceedable exceptions. To make transistion easier,
          this exception is a warning for now. In a future release of
          ST/X, this exception will be changed to be an error 
          (child of SignalError).
          Please fix your code.
"

! !

!ProceedError class methodsFor:'initialization'!

initialize

    NotifierString := 'handler tried to proceed from nonproceedable exception'.

    "
     self initialize
    "


! !

!ProceedError methodsFor:'default actions'!

defaultAction
    "make proceeding from a non-proceedable raise a warning for now.
     This will change in future revisions"

    ('WARNING: signal <', parameter signal printString, '> has been raised nonproceedable') errorPrintCR.
    ('         by: ', parameter suspendedContext printString) errorPrintCR.
    ('         ', suspendedContext printString , ' tries to proceed.') errorPrintCR.
    ('         This will be an error in future ST/X versions.') errorPrintCR.

    self proceedWith:nil.

    "
      Object errorSignal handle:[:ex|
         ex proceedWith:nil
      ] do:[
         Object errorSignal raise
      ].

      Object errorSignal handle:[:ex|
         ex proceed
      ] do:[
         Object errorSignal raise
      ].
   "
! !

!ProceedError class methodsFor:'documentation'!

version
    ^ '$Header: /cvs/stx/stx/libbasic/ProceedError.st,v 1.2 1999-08-04 14:35:58 stefan Exp $'
! !
ProceedError initialize!