[erlang-questions] yaws crashes
Robert Virding
rvirding@REDACTED
Tue Feb 10 15:36:16 CET 2009
I am not a yaws expert, but ...
The error reason, {case_clause,undefined}, says that in the case in out/1
there is no clause which matches the value returned by the call to
queryvar/1. The returned value is 'undefined' but there is only a clause
which matches {ok,Page}. An error is generated if there is no matching
clause in a case. Note that an error will also be generated if the first
call to queryvar/1 does not return a value which matches {ok,User}.
I hope this helps,
Robert
2009/2/10 Salonee Sinha Roy <ssroy1979@REDACTED>
> Hi
> I am trying to write a simple facebook app with iframes using yaws. My code
> is below
>
> <erl>
> out(Arg) ->
> {ok,User} = queryvar(Arg,"fb_sig_user"),
> case queryvar(Arg,"fb_sig_user_add") of
> {ok,Page} ->
> %% check if the user has added the app
> if
> Page == "0" ->
>
> {redirect_local,string:concat("/www/terms_cond.html?soc=fb&uid=",User)};
> Page == "1" ->
>
> {redirect_local,string:concat("/www/mask_flash.html?soc=fb&uid=",User)}
> end
> end.
> </erl>
>
>
> When I try going to the page above I get the following error
>
> ERROR erlang code crashed:
> File: /home/owner/Desktop/erlang/yaws/mask/mask.yaws:1
> Reason: {{case_clause,undefined},
> [{m5,out,1},
> {yaws_server,deliver_dyn_part,8},
> {yaws_server,aloop,3},
>
>
> {yaws_server,acceptor0,2},
> {proc_lib,init_p_do_apply,3}]}
> Req: {http_request,'GET',
> {abs_path,"/mask.yaws?fb_sig_in_iframe=1&fb_sig_locale=en_US&fb_sig_in_new_facebook=1&fb_sig_time=1234274303.4696&fb_sig_added=1&fb_sig_profile_update_time=1216854205&fb_sig_expires=0&fb_sig_user=713876569&fb_sig_session_key=e96b0d4702c06f34e28a68df-713876569&fb_sig_ss=0c2b63ba80e8ef2151b978a0ecd57fe7&fb_sig_ext_perms=offline_access%2Cemail&fb_sig_api_key=648e964d7625f3ed0d49cbb55b46c96a&fb_sig_app_id=2408954250&fb_sig=d34f0ce1ef76b40561a6e0e29dee2db9"},
>
>
> {1,1}}
> Stack: [{m5,out,1},
> {yaws_server,deliver_dyn_part,8},
> {yaws_server,aloop,3},
> {yaws_server,acceptor0,2
> {proc_lib,init_p_do_apply,3}]
>
>
> Any help would be appreciated.
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20090210/a86de58a/attachment.htm>
More information about the erlang-questions
mailing list