[plt-scheme] when is struct:exn-with-info != struct:exn-withinfo ?

From: Daniel Roy (droy at MIT.EDU)
Date: Sun Oct 12 15:45:16 EDT 2003

I am having a peculiar problem with schemeql/srpersist.  when connecting
to a database using schemeql:connect-to-database i'm getting an uncaught
exn-with-info.  upon investigation, i've determined that
connect-to-database calls into schemeql:driver-connect which is odbc.ss in
schemeql.  driver-connect calls srpersist's connect inside a wrapper
(called sister-interaction)...

here's the interesting bit. in sister-interaction, there is a
"with-handlers" that catches a "sr:exn-with-info" exception and handles
it.  however, i still get an occasional "exn-with-info" that escapes this
handler.  so i put a base case handler like this..


           [(lambda (exn) #t)
            (lambda (exn)
             (schemeql-message 1 "unknown exception >")
             (schemeql-message 1 (sr:exn-with-info? exn))
             (schemeql-message 1 exn)
             (sr:exn-with-info-val exn)
           )]

the exception is obviously handled (always true!), and the three messages
are:

unknown exception >
#f
#<struct:exn-with-info>
Servlet exception: "exn-with-info-val: expects args of type
<struct:exn-with-info>; given instance of a different
<struct:exn-with-info>"

anyone have any clue why i'm dealing with two different exn-with-info?
(also, i know that on other occassions, when the database connect works,
the exn-with-info is caught and handled properly.)

thanks, dan





Posted on the users mailing list.