[pg-devel] little error in clisp version of socket-connect function

Anton Vodonosov avodonosov at yandex.ru
Fri Dec 21 00:30:18 UTC 2007


Hi.

Clisp version of socket-connect function (file sysdep.lisp)
doesn't supply :transport-error argument when signaling
connection-failure error.

current version:

#+clisp
(defun socket-connect (port host)
  (declare (type integer port))
  (handler-case
   (#+lisp=cl socket:socket-connect
    #-lisp=cl lisp:socket-connect
    port host
    :element-type '(unsigned-byte 8)
    :buffered t)
   (error (e)
      (declare (ignore e))
      (error 'connection-failure :host host :port port))))


i would suggest to use:

#+clisp
(defun socket-connect (port host)
  (declare (type integer port))
  (handler-case
   (#+lisp=cl socket:socket-connect
    #-lisp=cl lisp:socket-connect
    port host :element-type '(unsigned-byte 8))
   (error (e)
      (error 'connection-failure 
             :host host 
             :port port 
             :transport-error e))))

Best regards,
-Anton



More information about the pg-devel mailing list