#DOCUMENTATION by cg
class: GenericException
comment/format in:
#deferAfter:
#documentation
--- a/GenericException.st Fri Nov 04 16:05:35 2016 +0100
+++ b/GenericException.st Fri Nov 04 16:06:46 2016 +0100
@@ -130,7 +130,7 @@
and NON-PROCEEDABLE signals must be raised with:
raise
- If you dont know/care as a raiser, you can use
+ If you don't know/care as a raiser, you can use
raiseSignal
which checks for proceedability and sends the appropriate message.
(sigh)
@@ -953,33 +953,33 @@
Deferring makes sense for some signals, such as UserInterrupt or AbortSignal,
which must occasionally be delayed temporarily until a save place is reached
- (especially when packages are sent across a communication channel, and you dont want
+ (especially when packages are sent across a communication channel, and you don't want
partial packages to be generated by user interruptions)."
|caughtException result|
self handle:[:ex |
- caughtException isNil ifTrue:[
- caughtException := ex.
- ].
- ex proceedWith:nil
+ caughtException isNil ifTrue:[
+ caughtException := ex.
+ ].
+ ex proceedWith:nil
] do:[
- result := aBlock value.
+ result := aBlock value.
].
caughtException notNil ifTrue:[
- caughtException suspendedContext:thisContext.
-
- "/ the exception was raised during the execution of aBlock above.
- "/ Raise it now (delayed).
- caughtException raiseSignal.
+ caughtException suspendedContext:thisContext.
+
+ "/ the exception was raised during the execution of aBlock above.
+ "/ Raise it now (delayed).
+ caughtException raiseSignal.
].
^ result
"
UserInterrupt deferAfter:[
- Transcript showCR:'1 - now raising, but will be deferred.'.
- UserInterrupt raiseRequestWith:'hello'.
- Transcript showCR:'2 - after the raise, deferred exception will be handled soon.'.
+ Transcript showCR:'1 - now raising, but will be deferred.'.
+ UserInterrupt raiseRequestWith:'hello'.
+ Transcript showCR:'2 - after the raise, deferred exception will be handled soon.'.
].
Transcript showCR:'3 - here after the protected block.'.
"