[racket-dev] differences in error reporting

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Tue Jan 29 21:11:23 EST 2013

What is the "custom" part of the language settings you have on?

Robby


On Tue, Jan 29, 2013 at 7:47 PM, Pierpaolo Bernardi <olopierpa at gmail.com>wrote:

> Update 2: it does not depend on buffer content.
>
> I have 9 tab open in this DrRacket. In 5 of them happen the strange
> message, in 4 of them it doesn't happen.
>
> I tried closing one in which it happened and then reopening the same
> file in a new tab, and in the new tab it doesn't happen.
>
>
> 2013/1/30, Robby Findler <robby at eecs.northwestern.edu>:
> > I don't see that with this program:
> >
> > #lang racket
> >
> > (define (integer->roman n)
> >   (cond ((not (integer? n))
> >          (raise-argument-error 'integer->roman "integer?" n))
> >         ((positive? n)
> >          (apply string-append n))
> >         ((negative? n)
> >          (apply string-append "NEGATIVVS " 1))
> >         (else
> >          "NVLLA")))
> >
> > Welcome to DrRacket, version 5.3.2.3--2013-01-29(32529d89/d) [3m].
> > Language: racket; memory limit: 128 MB.
> >> (integer->roman 3.3)
> > . . integer->roman: contract violation
> >   expected: integer?
> >   given: 3.3
> >> (integer->roman 3.3)
> > . . integer->roman: contract violation
> >   expected: integer?
> >   given: 3.3
> >>
> >
> >
> > On Tue, Jan 29, 2013 at 4:33 PM, Pierpaolo Bernardi
> > <olopierpa at gmail.com>wrote:
> >
> >> If I use raise-argument-error in my functions, like this:
> >>
> >> (define (integer->roman n)
> >>   (cond ((not (integer? n))
> >>          (raise-argument-error 'integer->roman "integer?" n))
> >>         ((positive? n)
> >>          (apply string-append (positive-integer->roman n)))
> >>         ((negative? n)
> >>          (apply string-append "NEGATIVVS " (positive-integer->roman (-
> >> n))))
> >>         (else
> >>          "NVLLA")))
> >>
> >> I get errors like this:
> >>
> >> Welcome to DrRacket, version 5.3.2.2--2013-01-26(88404f3/a) [3m].
> >> Language: racket [custom].
> >> > (integer->roman 3.3)
> >> integer->roman: contract violation
> >>   expected: integer?
> >>   given: 3.3
> >> > (integer->roman 3.3)
> >> . . C:\Program
> >> Files\Racket-Full-5.3.2.2\collects\racket\private\more-scheme.rkt:263:2:
> >> integer->roman: contract violation
> >>   expected: integer?
> >>   given: 3.3
> >>
> >> That is, from the second time on I get the extraneous prefix.  Is this
> >> expected?
> >>
> >> P.
> >>
> >>
> >> _________________________
> >>   Racket Developers list:
> >>   http://lists.racket-lang.org/dev
> >>
> >>
> >
>
> --
> Inviato dal mio dispositivo mobile
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/dev/archive/attachments/20130129/2e20a489/attachment.html>

Posted on the dev mailing list.