Ticket #298 (new enhancement)

Opened 4 years ago

Better error messages for accessors

Reported by: dvanhorn Owned by: krhari
Priority: minor Milestone:
Component: krhari/pfds.plt Keywords:
Cc: dvanhorn Version: (1 4)
Racket Version: 5.0.1.3

Description

Compare the quality of the error messages below. The PFDS library could do better.

Welcome to DrRacket, version 5.0.1.3--2010-08-25(-/f) [3m].
Language: racket; memory limit: 512 MB.
> (require (prefix-in pf: (planet krhari/pfds:1:4/skewbinaryrandomaccesslist)))
> (require (prefix-in rk: racket))
> (pf:second (pf:list 1))
. . list-ref: given index out of bounds
> (rk:second (rk:list 1))
. . second: expected argument of type <list with 2 or more items>; given '(1)

Note: See TracTickets for help on using tickets.