mercurial/HGCommand.st
changeset 447 73e53f58ae31
parent 446 35a8e7b3ad1e
child 448 a89dd6b4acc8
equal deleted inserted replaced
446:35a8e7b3ad1e 447:73e53f58ae31
   638 
   638 
   639     Trace ifTrue:[
   639     Trace ifTrue:[
   640         Logger log: 'cmd: propagating: ' , anException class name , ' - ', anException description severity: #trace facility: 'HG'.
   640         Logger log: 'cmd: propagating: ' , anException class name , ' - ', anException description severity: #trace facility: 'HG'.
   641     ].
   641     ].
   642     Debug ifTrue:[
   642     Debug ifTrue:[
   643     	anException isNotification ifFalse:[
   643         anException isNotification ifFalse:[
       
   644             | wasResumable |  
       
   645 
   644             anException suspendedContext notNil ifTrue:[
   646             anException suspendedContext notNil ifTrue:[
   645                 anException suspendedContext fullPrintAllOn: Transcript.
   647                 anException suspendedContext fullPrintAllOn: Transcript.
   646             ].
   648             ].
       
   649             "/ When debugging, open a debugger here so the user may check the 
       
   650             "/ stack and actual variable values in debugger.
       
   651             Debugger enter.
   647         ].
   652         ].
   648     ].
   653     ].
   649     errors nextPut: anException.
   654     errors nextPut: anException.
   650 
   655 
   651     "Created: / 04-02-2013 / 21:29:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   656     "Created: / 04-02-2013 / 21:29:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   652     "Modified: / 05-03-2014 / 00:08:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   657     "Modified: / 05-03-2014 / 00:08:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
   658     "Modified: / 17-07-2014 / 08:21:15 / jv"
   653 !
   659 !
   654 
   660 
   655 signal
   661 signal
   656     "Signal all propagated exceptions to the caller"
   662     "Signal all propagated exceptions to the caller"
   657 
   663 
   911 
   917 
   912     worker := [
   918     worker := [
   913         Trace ifTrue:[
   919         Trace ifTrue:[
   914             Logger log: 'cmd: worker ''', name , ''' spawned' severity: #trace facility: 'HG'.
   920             Logger log: 'cmd: worker ''', name , ''' spawned' severity: #trace facility: 'HG'.
   915         ].
   921         ].
   916         block on: Error do:[:ex|self propagate:ex]
   922         block on: Error do:[:ex|
       
   923             self propagate:ex
       
   924         ]
   917     ] newProcess.
   925     ] newProcess.
   918     worker addExitAction:[
   926     worker addExitAction:[
   919         Trace ifTrue:[
   927         Trace ifTrue:[
   920             Logger log: 'cmd: worker ''', name , ''' finished' severity: #trace facility: 'HG'.
   928             Logger log: 'cmd: worker ''', name , ''' finished' severity: #trace facility: 'HG'.
   921         ].
   929         ].
   925     worker name: name.
   933     worker name: name.
   926     ^worker
   934     ^worker
   927 
   935 
   928     "Created: / 03-03-2013 / 16:56:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   936     "Created: / 03-03-2013 / 16:56:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   929     "Modified: / 05-03-2013 / 19:42:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   937     "Modified: / 05-03-2013 / 19:42:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
   938     "Modified (format): / 17-07-2014 / 07:31:58 / jv"
   930 !
   939 !
   931 
   940 
   932 spawnErrorReaderOn: stderr
   941 spawnErrorReaderOn: stderr
   933     errorReader isNil ifTrue:[
   942     errorReader isNil ifTrue:[
   934         errorReader := self spawn: [ self parseError:  stderr ] name: 'Error reader'.
   943         errorReader := self spawn: [ self parseError:  stderr ] name: 'Error reader'.