[racket-dev] Contract problem
You are using a function that uses the pretty-xexpr/c contract that
exists so the Web Server can display those beautiful errors for users
who are learning xexprs.
Jay
On Mon, Jun 7, 2010 at 11:12 PM, Eli Barzilay <eli at barzilay.org> wrote:
> I just ran into some problem that might be in the contract system, or
> more likely in the xml collection (or maybe in both). I basically ran
> some code that I was editing, and got the lovely error message below.
> IIUC, it says that xexpr is broken, which is potentially one problem.
> It's probably not strict enough about what it accepts, since the
> problem was basically due to my code using #<void> as the value of an
> attribute. But the second problem is this error message shows the
> "Context" as a dump of the whole xexpr -- pretty printed across ~4500
> lines.
>
>
> /download/chronology/index.ss: running...
> <collects>/xml/private/xexpr.rkt:
> (file
> /home/scheme/plt/collects/xml/private/syntax.rkt)
> broke the contract (-> xexpr? string?) on xexpr->string given to
> (file
> /home/scheme/iplt/web/old/common/layout.ss)
> ; Not an Xexpr. Expected a string, given #<void>
>
> Context:
> (html
> ...126 lines...
> ((href "http://download.plt-scheme.org/chronology/racket5.0.html"))
> (font ((color #<void>)) "Racket" nbsp (tt () "5.0"))
> ...4300 lines...
> "\n"))
>
> === context ===
> /home/scheme/plt/collects/racket/contract/private/blame.rkt:54:0: raise-blame-error
> /home/scheme/plt/collects/racket/private/more-scheme.rkt:173:2: select-handler/no-breaks
> /home/scheme/plt/collects/racket/contract/private/arrow.rkt:1434:3
> /home/scheme/iplt/web/old/common/layout.ss:44:0: xexpr->string*
> /home/scheme/iplt/web/old/download/chronology/index.ss:66:0: run
> /home/scheme/iplt/web/old/common/utils.ss:8:50: run-file
> /home/scheme/iplt/web/old/common/build.ss:20:2: for-loop
> /home/scheme/iplt/web/old/common/build.ss:20:2: for-loop
> /home/scheme/plt/collects/racket/private/map.rkt:45:11: for-each
> /home/scheme/iplt/web/old/common/utils.ss:8:50: build
>
>
> --
> ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
> http://barzilay.org/ Maze is Life!
> _________________________________________________
> For list-related administrative tasks:
> http://lists.racket-lang.org/listinfo/dev
>
--
Jay McCarthy <jay at cs.byu.edu>
Assistant Professor / Brigham Young University
http://teammccarthy.org/jay
"The glory of God is Intelligence" - D&C 93