[squeak-dev] The Inbox: Kernel-cmm.812.mcz

Chris Muller asqueaker at gmail.com
Wed Oct 23 20:51:40 UTC 2013


I use these utilities from multiple applications.  If no vehement
objections, I'll add them to trunk in a few days.

On Wed, Oct 23, 2013 at 3:13 PM,  <commits at source.squeak.org> wrote:
> A new version of Kernel was added to project The Inbox:
> http://source.squeak.org/inbox/Kernel-cmm.812.mcz
>
> ==================== Summary ====================
>
> Name: Kernel-cmm.812
> Author: cmm
> Time: 23 October 2013, 3:13:11.812 pm
> UUID: 68690126-9bc1-4cbc-b97e-75280610af28
> Ancestors: Kernel-nice.811
>
> Printing utilities for Blocks which include the source code of the block, and Errors which include the description and stack-trace.
>
> =============== Diff against Kernel-nice.811 ===============
>
> Item was changed:
>   ----- Method: BlockClosure>>fullPrintOn: (in category 'printing') -----
> + fullPrintOn: aStream
> +       aStream
> +                print: self ;
> +                cr.
> +       self printSourceOn: aStream!
> - fullPrintOn: aStream
> -       aStream print: self; cr.
> -       (self decompile ifNil: ['--source missing--']) printOn: aStream indent: 0!
>
> Item was added:
> + ----- Method: BlockClosure>>printSourceOn: (in category 'printing') -----
> + printSourceOn: aStream
> +       self decompile
> +               ifNil: [ aStream nextPutall: '--source missing--' ]
> +               ifNotNil:
> +                       [ : parseNode | parseNode statements anyOne
> +                               printOn: aStream
> +                               indent: 0 ]!
>
> Item was added:
> + ----- Method: BlockClosure>>sourceString (in category 'printing') -----
> + sourceString
> +       ^ String streamContents: [ : stream | self printSourceOn: stream ]!
>
> Item was added:
> + ----- Method: Error>>printVerboseOn: (in category 'printing') -----
> + printVerboseOn: aStream
> +       aStream
> +                wantsLineEndConversion: true ;
> +                setToEnd ;
> +                nextPutAll: 'vvvvvvvvvvvvvvvvvv ' , self description , ' vvvvvvvvvvvvvvvvvv' ;
> +                cr ;
> +                nextPutAll: 'The time is ', DateAndTime now asString ;
> +                cr.
> +       "Allow applications to optionally print extra details without overriding a base package."
> +       (self respondsTo: #printDetailsOn:) ifTrue: [ self printDetailsOn: aStream ].
> +       aStream
> +                nextPutAll: self signalerContext longStack ;
> +                cr ;
> +                nextPutAll: '^^^^^^^^^^^^^^^^^^ ' , self description , ' ^^^^^^^^^^^^^^^^^^' ;
> +                cr!
>
>


More information about the Squeak-dev mailing list