class: GenericException
changed:
#doRaise
#handles:
#signal
#signalWith:
category of:
#signal
#signalWith:
use #creator instead of #signal
(avoid semantic conflict with ANSI, where signal means: raise)
--- a/GenericException.st Fri Apr 19 11:40:36 2013 +0200
+++ b/GenericException.st Fri Apr 19 11:41:15 2013 +0200
@@ -200,16 +200,25 @@
! !
-
-!GenericException class methodsFor:'Compatibility-Squeak'!
+!GenericException class methodsFor:'Compatibility-ANSI'!
signal
"raise a signal proceedable or nonproceedable (whichever is right).
- The argument is used as messageText."
+ ANSI compatibility."
^ self raiseSignal
"Created: / 20-11-2006 / 14:00:09 / cg"
+!
+
+signalWith:messageText
+ "raise a signal proceedable or nonproceedable (whichever is right).
+ The argument is used as messageText.
+ ANSI compatibility."
+
+ <resource: #skipInDebuggersWalkBack>
+
+ self raiseErrorString:messageText
! !
!GenericException class methodsFor:'accessing'!
@@ -486,7 +495,7 @@
|signal|
- signal := anException signal.
+ signal := anException creator.
self == signal ifTrue:[^ true]. "quick check"
anException isNotification ifTrue:[^ false]. "speed up queries by not traversing the parent chain"
@@ -855,14 +864,6 @@
raiseWith:aParameter in:aContext
"Modified: / 10-08-2010 / 09:52:38 / cg"
-!
-
-signalWith:messageText
- "ANSI compatibility"
-
- <resource: #skipInDebuggersWalkBack>
-
- self raiseErrorString:messageText
! !
!GenericException class methodsFor:'save evaluation'!
@@ -1118,8 +1119,12 @@
^ self restartDo:alternativeBlock
!
-signalWith:messageText
- self messageText:messageText.
+signalWith:messageTextArg
+ "raise a signal proceedable or nonproceedable (whichever is right).
+ The argument is used as messageText.
+ ANSI compatibility."
+
+ self messageText:messageTextArg.
^ self raise
! !
@@ -1383,7 +1388,11 @@
!
signal
- "return the signal, that caused the exception"
+ "return the signal, that caused the exception.
+ 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."
^ signal ? self class
@@ -1981,7 +1990,7 @@
because it tries to raise e.g. AbortOperationRequest even if it has bee invoked
by e.g. NoHandlerError"
- (ex1 signal == signal) ifTrue:[
+ (ex1 creator == signal) ifTrue:[
"the same exception that has been cought by a default action is raised again.
don't recurse"
^ self noHandler.
@@ -2309,11 +2318,11 @@
!GenericException class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/GenericException.st,v 1.136 2013-04-17 18:22:11 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/GenericException.st,v 1.137 2013-04-19 09:41:15 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/GenericException.st,v 1.136 2013-04-17 18:22:11 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/GenericException.st,v 1.137 2013-04-19 09:41:15 cg Exp $'
! !