[plt-scheme] schemeql

From: Katsmall the Wise (kela_bit at netvision.net.il)
Date: Fri Mar 21 15:00:24 EST 2003

Anton van Straaten wrote:

>I did notice that using SrPersist directly, when functions like 'connect'
>are invoked, DrScheme returns the ladybug icon with a status message such as
>"SQL_SUCCESS_WITH_INFO occurred in connect".  Because of this, I can't
>execute a script all at once, since it stops whenever it gets to such a
>statement.  I assumed that SchemeQL does whatever it needs to to deal with
>this, though.
That, I have a solution for.
Simply call each command inside a
(with-handlers ([exn? (lambda (e) e)])

To make it simpler you can
(define-macro try
  (lambda commands
    `(with-handlers ([exn? (lambda (e) e)])
       . ,(append commands `(#f)))))

Then you can call each command as
(try <command>)

Katsmall the Wise
esiW eht llamstaK

Posted on the users mailing list.