Changeset 15224 in project


Ignore:
Timestamp:
07/15/09 21:34:07 (10 years ago)
Author:
certainty
Message:

fixed bug. the full path is now passed to dispatch-error

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/uri-dispatch/trunk/uri-dispatch.scm

    r15221 r15224  
    88;; Version: $Id$
    99;; Version:
    10 ;; Last-Updated: Mi Jul 15 21:34:53 2009 (CEST)
     10;; Last-Updated: Mi Jul 15 21:49:20 2009 (CEST)
    1111;;           By: David Krentzlin <david@lisp-unleashed.de>
    12 ;;     Update #: 91
     12;;     Update #: 96
    1313;; URL:
    1414;; Keywords:
     
    8484        (if (equal? (car path) "")
    8585            (apply (or (default-dispatch-target) (dispatch-error)) '())
    86             (apply (or (handler-ref (string->symbol (car path)))
    87                        (dispatch-error))
    88                    (cdr path))))
     86            (let ((handler (handler-ref (string->symbol (car path)))))
     87              (if handler
     88                  (handler (cdr path)))
     89                  (apply (dispatch-error) path))))
    8990       (else
    9091        (let ((mod/proc (handler-ref (string->symbol (string-append (car path) "#" (cadr path))) (string->symbol (car path)))))
    9192          (if mod/proc
    9293              (apply mod/proc (cddr path))
    93               (apply (or (handler-ref (string->symbol (car path)))
    94                          (dispatch-error))
    95                      (cdr path))))))))
     94              (let ((handler (handler-ref (string->symbol (car path)))))
     95                (if handler
     96                    (handler (cdr path))
     97                    (apply (dispatch-error) path)))))))))
    9698
    9799  (define (handler-ref symbol #!optional (mod #f))
Note: See TracChangeset for help on using the changeset viewer.