Changeset 15660 in project for chicken/trunk


Ignore:
Timestamp:
08/30/09 16:15:25 (10 years ago)
Author:
felix winkelmann
Message:

chicken-install tries alternative servers if server responds with error

Location:
chicken/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • chicken/trunk/TODO

    r15657 r15660  
    5151** tools
    5252*** chicken-bug: SMTP servers not accessible (greylisting)
    53 *** chicken-install: try different servers if egg not found
    5453
    5554
  • chicken/trunk/chicken-install.scm

    r15614 r15660  
    178178  (define *checked* '())
    179179  (define *csi* (shellpath (make-pathname *program-path* (foreign-value "C_CSI_PROGRAM" c-string))))
    180  
     180
    181181  (define (try-extension name version trans locn)
    182182    (condition-case
     
    194194       (print "HTTP protocol error")
    195195       (values #f "") ]
     196      [e (exn setup-download-error)
     197         (print "Server error:")
     198         (print-error-message e)
     199         (values #f "")]
    196200      [e ()
    197201       (abort e) ] ) )
  • chicken/trunk/setup-download.scm

    r15116 r15660  
    241241        (let ([name (read in)])
    242242          (cond [(and (pair? name) (eq? 'error (car name)))
    243                  (apply error (string-append "[Server] " (cadr name)) (cddr name)) ]
     243                 (throw-server-error (cadr name) (cddr name))]
    244244                [(or (eof-object? name) (not name))
    245245                 (close-input-port in)
     
    261261                 (get-files (cons name files)) ] ) ) ) ) )
    262262
     263  (define (throw-server-error msg args)
     264    (abort
     265     (make-composite-condition
     266      (make-property-condition
     267       'exn
     268       'message (string-append "[Server] " msg)
     269       'arguments args)
     270      (make-property-condition 'setup-download-error))))
     271
    263272  (define (read-chunks in)
    264273    (let get-chunks ([data '()])
Note: See TracChangeset for help on using the changeset viewer.