class: GenericException
changed:
#raise
#raiseRequest
#raiseSignal
care for non-nil handlerContext in raise;
then, an instance is reraised from within a handler,
and we should setup a new suspended context.
Otherwise, the same handler would be found again and
again, leading to a recursion error.
--- a/GenericException.st Thu Nov 20 17:57:58 2014 +0100
+++ b/GenericException.st Fri Nov 21 15:41:28 2014 +0100
@@ -2088,8 +2088,8 @@
<context: #return>
raiseContext := thisContext.
- suspendedContext isNil ifTrue:[
- suspendedContext := raiseContext sender
+ (suspendedContext isNil or:[handlerContext notNil]) ifTrue:[
+ suspendedContext := raiseContext sender
].
proceedable := false.
@@ -2130,25 +2130,6 @@
"Created: / 10-08-2010 / 09:30:19 / cg"
!
-raiseRequest
- "actually raise a proceedable exception."
-
- <context: #return>
-
- raiseContext := thisContext.
- suspendedContext isNil ifTrue:[
- suspendedContext := raiseContext sender
- ].
-
- self checkProceedable.
-
- proceedable := true.
- ^ self doRaise
-
- "Modified: / 04-08-1999 / 08:05:12 / stefan"
- "Modified: / 10-08-2010 / 09:55:00 / cg"
-!
-
raiseRequestErrorString:errorString in:aContext
"actually raise a proceedable exception."
@@ -2242,8 +2223,8 @@
raiseContext := thisContext.
- suspendedContext isNil ifTrue:[
- suspendedContext := raiseContext sender
+ (suspendedContext isNil or:[handlerContext notNil]) ifTrue:[
+ suspendedContext := raiseContext sender
].
proceedable := self mayProceed.
^ self doRaise
@@ -2373,11 +2354,11 @@
!GenericException class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/GenericException.st,v 1.156 2014-06-10 10:13:08 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/GenericException.st,v 1.157 2014-11-21 14:41:28 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/GenericException.st,v 1.156 2014-06-10 10:13:08 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/GenericException.st,v 1.157 2014-11-21 14:41:28 cg Exp $'
! !