brownplt / pyret-docs

The documentation for Pyret.
9 stars 18 forks source link

Schanzer/improved error #68

Closed schanzer closed 2 years ago

schanzer commented 2 years ago

When a ChartWindow declares methods which it doesn't actually contain, the resulting error is not helpful:

second: contract violation
  expected: list?
  given: #f
  context...:
   /Users/schanzer/Documents/Bootstrap/Development/pyret-docs/scribble-api.rkt:213:22
   /Applications/Racketv8.0/collects/racket/private/list.rkt:115:2: findf
   /Users/schanzer/Documents/Bootstrap/Development/pyret-docs/scribble-api.rkt:210:0: find-defn/nowarn
   /Users/schanzer/Documents/Bootstrap/Development/pyret-docs/scribble-api.rkt:489:1: method-doc
   body of "/Users/schanzer/Documents/Bootstrap/Development/pyret-docs/src/trove/chart.js.rkt"

This patch, from @blerner , gives the following error instead:

WARNING in method-doc: No definition for method horizontal for data ChartWindow and variant box-plot-chart-window in module "chart"
Could not find spec for horizontal
  context...:
   body of "/Users/schanzer/Documents/Bootstrap/Development/pyret-docs/src/trove/chart.js.rkt"
   .../private/map.rkt:40:19: loop
   /Applications/Racketv8.0/collects/racket/cmdline.rkt:191:51
   body of "/Users/schanzer/Documents/Bootstrap/Development/pyret-docs/run.rkt"
make: *** [docs] Error 1
blerner commented 2 years ago

presumably the typo-fixes don't belong in this PR?

schanzer commented 2 years ago

looks like I didn't fetch origin first -- let me close and redo...