Cleanuo in `Smalltalk >> #executeStartBlocks`
* Use `Logger` instead of (obsolete) infoPrintCR:
* Remove start block before it's executed. This simplifies
cases where start block actually calls `Smalltalk >> #exit:`
--- a/Smalltalk.st Wed Jan 18 10:18:09 2017 +0000
+++ b/Smalltalk.st Wed Jan 18 22:52:31 2017 +0000
@@ -3893,21 +3893,22 @@
startBlocks := self startBlocks.
startBlocks notNil ifTrue:[
- 'Smalltalk [info]: execute startBlocks...' infoPrintCR.
- startBlocks do:[:aBlock|
- Error handle:[:ex |
- InfoPrinting == true ifTrue:[
- 'Smalltalk [warning]: error caught in startBlock: ' infoPrint.
- ex description infoPrintCR.
- ex infoPrintCR.
- thisContext fullPrintAll.
- ].
- ] do: aBlock
- ].
- startBlocks removeAll.
+ Logger info: 'Executing start blocks'.
+ startBlocks copy do:[:aBlock|
+ startBlocks remove: aBlock.
+ aBlock on: Error do:[:ex |
+ Logger error: 'Error when executing start block: %1' with: ex description.
+ InfoPrinting == true ifTrue:[
+ ex description infoPrintCR.
+ ex infoPrintCR.
+ thisContext fullPrintAll.
+ ].
+ ]
+ ].
].
"Created: / 07-01-2012 / 12:58:39 / cg"
+ "Modified: / 18-01-2017 / 22:45:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
hideSplashWindow