DSSSL Library Reference: Part of the Modular DocBook Stylesheet distribution
Prev |  | Next

# my-debug

## Name

my-debug -- A debugging function more helpful than (debug)

## Synopsis

    (my-debug x #!optional return-value)

## Description

A version of debug that tries to print information more helpful than "unknown object ...". Will need extending for any further types added to Jade which don't have useful print methods. (Should yield more information extracted from each type.)

x

  The object about which debugging information is desired.

## Author

Tony Graham

## Source Code

    (define (my-debug x #!optional return-value)
      ;; A debugging function more helpful than (debug)
      (let ((msg (debug (cond ((node-list? x)
    			   (if (node-list-empty? x)
    			       (list 'empty-node-list x)
    			       (list (if (named-node-list? x)
    					 'named-node-list
    					 'node-list)
    				     (node-list-length x) x)))
    			  ((sosofo? x)
    			   (list 'sosofo x))
    			  ((procedure? x)
    			   (list 'procedure x))
    			  ((style? x)
    			   (list 'style x))
    			  ((address? x)
    			   (list 'address x))
    			  ((color? x)
    			   (list 'color x))
    			  ((color-space? x)
    			   (list 'color-space x))
    			  ((display-space? x)
    			   (list 'display-space x))
    			  ((inline-space? x)
    			   (list 'inline-space x))
    			  ((glyph-id? x)
    			   (list 'glyph-id x))
    			  ((glyph-subst-table? x)
    			   (list 'glyph-subst-table x))
    			  (else x)))))
        x))

Prev | Home | Next
Debug | Up | Miscellaneous