--- a/GenericException.st Tue May 21 21:58:09 2013 +0100
+++ b/GenericException.st Fri May 24 18:52:05 2013 +0100
@@ -12,11 +12,11 @@
"{ Package: 'stx:libbasic' }"
Object subclass:#GenericException
- instanceVariableNames: 'signal parameter messageText suspendedContext raiseContext
+ instanceVariableNames:'signal parameter messageText suspendedContext raiseContext
handlerContext rejected originator proceedable'
- classVariableNames: 'StrictRaising'
- poolDictionaries: ''
- category: 'Kernel-Exceptions'
+ classVariableNames:'StrictRaising'
+ poolDictionaries:''
+ category:'Kernel-Exceptions'
!
GenericException class instanceVariableNames:'NotifierString'
@@ -169,7 +169,6 @@
"
! !
-
!GenericException class methodsFor:'initialization'!
initialize
@@ -180,13 +179,12 @@
"Modified: / 17-11-2010 / 17:53:13 / cg"
! !
-
!GenericException class methodsFor:'instance creation'!
new
"{ Pragma: +inlineNew }"
- ^ self basicNew setSignal:self.
+ ^ self basicNew creator:self.
"Modified: / 23.7.1999 / 13:53:12 / stefan"
"Created: / 24.7.1999 / 13:21:13 / stefan"
@@ -195,13 +193,12 @@
newException
"{ Pragma: +inlineNew }"
- ^ self basicNew setSignal:self.
+ ^ self basicNew creator:self.
"Created: / 23.7.1999 / 13:45:49 / stefan"
"Modified: / 24.7.1999 / 13:21:25 / stefan"
! !
-
!GenericException class methodsFor:'Compatibility-Squeak'!
signal
@@ -213,7 +210,6 @@
"Created: / 20-11-2006 / 14:00:09 / cg"
! !
-
!GenericException class methodsFor:'accessing'!
errorString
@@ -239,7 +235,6 @@
NotifierString := aString
! !
-
!GenericException class methodsFor:'backward compatibility'!
abortingEmergencyHandler
@@ -291,7 +286,6 @@
^ NoHandlerError notifyingEmergencyHandlerForUserProcesses
! !
-
!GenericException class methodsFor:'child signal creation'!
newSignal
@@ -325,7 +319,6 @@
"Created: / 23.7.1999 / 20:12:43 / stefan"
! !
-
!GenericException class methodsFor:'converting'!
, anExceptionHandler
@@ -334,7 +327,6 @@
^ SignalSet with:self with:anExceptionHandler
! !
-
!GenericException class methodsFor:'misc ui support'!
iconInBrowserSymbol
@@ -343,7 +335,6 @@
^ #exceptionClassBrowserIcon
! !
-
!GenericException class methodsFor:'printing'!
description
@@ -381,7 +372,6 @@
"Created: / 10-02-2011 / 12:28:51 / cg"
! !
-
!GenericException class methodsFor:'queries'!
accepts:aSignal
@@ -537,7 +527,6 @@
"Modified: / 23.7.1999 / 16:15:38 / stefan"
! !
-
!GenericException class methodsFor:'raising'!
raise
@@ -876,7 +865,6 @@
self raiseErrorString:messageText
! !
-
!GenericException class methodsFor:'save evaluation'!
catch:aBlock
@@ -1063,7 +1051,6 @@
"Modified: / 07-12-2006 / 17:05:35 / cg"
! !
-
!GenericException class methodsFor:'testing'!
isControlInterrupt
@@ -1108,7 +1095,6 @@
"Modified: / 23.7.1999 / 14:50:11 / stefan"
! !
-
!GenericException methodsFor:'Compatibility-ANSI'!
pass
@@ -1140,7 +1126,6 @@
^ self raise
! !
-
!GenericException methodsFor:'Compatibility-Dolphin'!
stackTrace:numberOfFrames
@@ -1167,14 +1152,12 @@
"
! !
-
!GenericException methodsFor:'Compatibility-Squeak'!
signalerContext
^ self suspendedContext
! !
-
!GenericException methodsFor:'Compatibility-V''Age'!
exitWith:value
@@ -1183,7 +1166,6 @@
"Created: / 28-08-2010 / 14:43:23 / cg"
! !
-
!GenericException methodsFor:'accessing'!
catchInDebugger
@@ -1408,7 +1390,9 @@
Warning and notice: in ANSI, signal means: raise;
here and in old VW, it is the accessor to create.
This will change in the near future; please use #creator to get
- the creator."
+ the creator. Marked as obsolete, until the change is done!!"
+
+ self obsoleteMethodWarning:'meaning of #signal will change. Use #creator'.
^ signal ? self class
@@ -1437,7 +1421,6 @@
"Modified: / 2.3.1998 / 12:20:43 / stefan"
! !
-
!GenericException methodsFor:'copying'!
postCopy
@@ -1456,7 +1439,6 @@
"Created: / 2.3.1998 / 12:30:06 / stefan"
! !
-
!GenericException methodsFor:'default actions'!
defaultAction
@@ -1526,7 +1508,6 @@
in:suspendedContext.
! !
-
!GenericException methodsFor:'default values'!
defaultResumeValue
@@ -1537,7 +1518,6 @@
^ nil
! !
-
!GenericException methodsFor:'handler actions'!
exit
@@ -1817,8 +1797,18 @@
|con|
con := handlerContext.
+ "/ cg: moving the following clearing of the handlerContext
+ "/ to before the evalUnwindActions allows for the exception
+ "/ to be handled during the unwind.
+ "/ It can be discussed, whether this is correct or not;
+ "/ I think, that the unwind actions should behave just the same as
+ "/ when a normal return is done. As unwind actions are called,
+ "/ these are unmarkedForUnwind anyway, so there should be no danger
+ "/ for endless recursion here... (i.e. each unwind action can at most
+ "/ reraise that exception once).
+ handlerContext := suspendedContext := raiseContext := nil.
thisContext evaluateUnwindActionsUpTo:con.
- handlerContext := suspendedContext := raiseContext := nil.
+ "/ handlerContext := suspendedContext := raiseContext := nil.
con return:(self defaultReturnValue)
"Modified: / 7.9.2001 / 13:29:34 / cg"
@@ -1830,8 +1820,18 @@
|con|
con := handlerContext.
+ "/ cg: moving the following clearing of the handlerContext
+ "/ to before the evalUnwindActions allows for the exception
+ "/ to be handled during the unwind.
+ "/ It can be discussed, whether this is correct or not;
+ "/ I think, that the unwind actions should behave just the same as
+ "/ when a normal return is done. As unwind actions are called,
+ "/ these are unmarkedForUnwind anyway, so there should be no danger
+ "/ for endless recursion here... (i.e. each unwind action can at most
+ "/ reraise that exception once).
+ handlerContext := suspendedContext := raiseContext := nil.
thisContext evaluateUnwindActionsUpTo:con.
- handlerContext := suspendedContext := raiseContext := nil.
+ "/ handlerContext := suspendedContext := raiseContext := nil.
con return:value.
"Modified: 27.3.1997 / 16:46:51 / cg"
@@ -1845,8 +1845,18 @@
|con|
con := handlerContext.
+ "/ cg: moving the following clearing of the handlerContext
+ "/ to before the evalUnwindActions allows for the exception
+ "/ to be handled during the unwind.
+ "/ It can be discussed, whether this is correct or not;
+ "/ I think, that the unwind actions should behave just the same as
+ "/ when a normal return is done. As unwind actions are called,
+ "/ these are unmarkedForUnwind anyway, so there should be no danger
+ "/ for endless recursion here... (i.e. each unwind action can at most
+ "/ reraise that exception once).
+ handlerContext := suspendedContext := raiseContext := nil.
thisContext evaluateUnwindActionsUpTo:con.
- handlerContext := suspendedContext := raiseContext := nil.
+ "/ handlerContext := suspendedContext := raiseContext := nil.
con returnDoing:aBlock
"
@@ -1864,7 +1874,6 @@
self return:value
! !
-
!GenericException methodsFor:'printing & storing'!
description
@@ -1906,7 +1915,6 @@
aStream nextPutAll:self description
! !
-
!GenericException methodsFor:'private'!
checkProceedable
@@ -2061,7 +2069,6 @@
"Modified: / 10-08-2010 / 09:26:14 / cg"
! !
-
!GenericException methodsFor:'raising'!
raise
@@ -2278,17 +2285,17 @@
"Created: / 10-08-2010 / 09:50:54 / cg"
! !
-
!GenericException methodsFor:'setup'!
-setSignal:aSignal
+creator:aSignal
"set the fields usable for inspection by the handler
- - only to be sent from the signal when raising.
- CG: added this one to avoid confusion with dolphin signal: (which raises the ex)"
+ - only to be sent from the signal when raising."
signal := aSignal.
!
+
+
suspendedContext:sContext errorString:aString
"set required fields
- only to be sent from the signal when raising"
@@ -2327,7 +2334,6 @@
originator := anOriginator.
! !
-
!GenericException methodsFor:'testing'!
isError
@@ -2344,15 +2350,14 @@
^ false
! !
-
!GenericException class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/GenericException.st,v 1.137 2013-04-19 09:41:15 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/GenericException.st,v 1.139 2013-05-21 20:26:48 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/GenericException.st,v 1.137 2013-04-19 09:41:15 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/GenericException.st,v 1.139 2013-05-21 20:26:48 cg Exp $'
!
version_HG