I have the following file:

#lang racket

(provide (all-defined-out))

(struct exn:fail:bmtc exn:fail ()
    #:extra-constructor-name make-exn:fail:bmtc
    #:transparent)

;; I expect this to take all the arguments from exn (its ultimate
superclass), plus a new argument which comes last.
(struct exn:fail:bmtc:unknown-user exn:fail:bmtc (username)
    #:extra-constructor-name make-exn:fail:bmtc:unknown-user
    #:transparent)


At the command line:

$ racket
-> (require "network/exceptions")

-> exn:fail:bmtc:unknown-user
#<procedure:exn:fail:bmtc:unknown-user>

-> (exn:fail:bmtc:unknown-user "message" (current-continuation-marks) "bob")
; exn:fail:bmtc:unknown-user: arity mismatch;
;  the expected number of arguments does not match the given number
;   expected: 2
;   given: 3
; [,bt for context]

-> (exn:fail:bmtc:unknown-user "msg" (current-continuation-marks))
(exn:fail:bmtc:unknown-user "msg" #<continuation-mark-set>)


Given the declaration of exn:fail:bmtc:unknown-user I was expecting it to
take a third argument.  What am I missing?


Note that I'm using Emacs and the command line, not DrRacket.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to