Method.st
changeset 11778 a4d708790f90
parent 11663 6ef3b25bd306
child 11848 ca89d472f9cf
equal deleted inserted replaced
11777:000651e1db46 11778:a4d708790f90
   520             ].
   520             ].
   521         ].
   521         ].
   522         chunk notNil ifTrue:[
   522         chunk notNil ifTrue:[
   523             ^ chunk
   523             ^ chunk
   524         ].
   524         ].
   525         aStream := self sourceStream.
   525 
   526         aStream notNil ifTrue:[
   526         LastFileLock critical:[
   527             [
   527             "have to protect aStream from being closed as a side effect 
   528                 chunk := self sourceChunkFromStream:aStream.
   528              of some other process fetching some the source from a different source file"
   529             ] on:DecodingError do:[:ex|
   529 
   530                 "CharacterEncoder>>#guessEncoding is not fail safe - retry with plain unecoded data"
   530             aStream := self sourceStream.
   531 
   531             aStream notNil ifTrue:[
   532                 ('DecodingError ignored when reading <1p> (<2p>)' expandMacrosWith:self whoString with:ex description) infoPrintCR.
   532                 [
   533                 aStream := self rawSourceStream.
   533                     chunk := self sourceChunkFromStream:aStream.
   534                 ex restart.
   534                 ] on:DecodingError do:[:ex|
       
   535                     "CharacterEncoder>>#guessEncoding is not fail safe - retry with plain unencoded data"
       
   536 
       
   537                     ('DecodingError ignored when reading <1p> (<2p>)' expandMacrosWith:self whoString with:ex description) infoPrintCR.
       
   538                     aStream := self rawSourceStream.
       
   539                     ex restart.
       
   540                 ].
   535             ].
   541             ].
   536         ].
   542         ].
   537     ].
   543     ].
   538 
   544 
   539     "Cache the source of recently used methods"
   545     "Cache the source of recently used methods"
  2846 ! !
  2852 ! !
  2847 
  2853 
  2848 !Method class methodsFor:'documentation'!
  2854 !Method class methodsFor:'documentation'!
  2849 
  2855 
  2850 version
  2856 version
  2851     ^ '$Header: /cvs/stx/stx/libbasic/Method.st,v 1.319 2009-04-07 09:15:16 stefan Exp $'
  2857     ^ '$Header: /cvs/stx/stx/libbasic/Method.st,v 1.320 2009-06-20 09:16:54 stefan Exp $'
  2852 ! !
  2858 ! !
  2853 
  2859 
  2854 Method initialize!
  2860 Method initialize!