Hi Mansur,

> !? (throw "http")
> "http" -- Tag not found
> ...
> (de http401 ()
>    (httpStat 401 "Unauthorized" "WWW-Authenticate: Negotiate")
>    (throw "http") )  # <-- error occurs here

The catch/throw tag in the 'http' function is "http", a transient
symbol, which is accessible only in that source file (lib/http.l).

This is to keep the scope locally, to avoid possible conflicts with
application code throwing a tag with the same name during a HTTP
transaction.


The easiest would be to define 'http401' directly in "lib/http.l".


Another solution would be to "steal" partial code from some other
function in "lib/http.l".

Instead of

   (de http401 ()
      (httpStat 401 "Unauthorized" "WWW-Authenticate: Negotiate")
      (throw "http") )

you could write

   (def 'http401
      (cons NIL
         '(httpStat 401 "Unauthorized" "WWW-Authenticate: Negotiate")
         (cddr forbidden) ) )

Cheers,
- Alex
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to