ProceedError.st
author Claus Gittinger <cg@exept.de>
Wed, 18 Dec 2019 19:05:01 +0100
changeset 25155 5ab0366fbef0
parent 24789 9d284b4d8569
permissions -rw-r--r--
regenerated

"{ Encoding: utf8 }"

"
 COPYRIGHT (c) 1999 by eXept Software AG
              All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"
"{ Package: 'stx:libbasic' }"

"{ NameSpace: Smalltalk }"

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

!ProceedError class methodsFor:'documentation'!

copyright
"
 COPYRIGHT (c) 1999 by eXept Software AG
              All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"


!

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 might 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 print a warning for now.
     This may change in future revisions.
     cg: no, this will stay as it is."

    |con|

    con := parameter suspendedContext.
    
    ('WARNING: proceeding signal <', parameter creator printString, '>') errorPrintCR.
    ('         which was raised nonproceedable by: ', con printString) errorPrintCR.
    con notNil ifTrue:[
        ('    : ', con sender printString) errorPrintCR.
        ('    : ', con sender sender printString) errorPrintCR.
    ].        
    ('         in: ', suspendedContext printString , ' tries to proceed.') errorPrintCR.
    ('           : ', thisContext sender printString) errorPrintCR.
    ('           : ', thisContext sender sender printString) errorPrintCR.
    ('           : ', thisContext sender sender sender printString) errorPrintCR.
    "/ ('         This may 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
      ].
   "

    "Modified: / 13-11-2016 / 10:52:37 / cg"
    "Modified: / 26-10-2018 / 00:44:50 / Claus Gittinger"
! !

!ProceedError class methodsFor:'documentation'!

version
    ^ '$Header$'
! !


ProceedError initialize!