I am not a yaws expert, but ...<br><br>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}.<br>
<br>I hope this helps,<br><br>Robert<br><br><div class="gmail_quote">2009/2/10 Salonee Sinha Roy <span dir="ltr"><<a href="mailto:ssroy1979@gmail.com" target="_blank">ssroy1979@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi<br>I am trying to write a simple facebook app with iframes using yaws. My code is below <br>
<br><erl> <br>out(Arg) -><br> {ok,User} = queryvar(Arg,"fb_sig_user"),<br> case queryvar(Arg,"fb_sig_user_add") of<br>
{ok,Page} -> <br> %% check if the user has added the app<br> if <br> Page == "0" -><br> {redirect_local,string:concat("/www/terms_cond.html?soc=fb&uid=",User)};<br>
Page == "1" -><br> {redirect_local,string:concat("/www/mask_flash.html?soc=fb&uid=",User)}<br> end<br> end.<br></erl> <br><br><br>When I try going to the page above I get the following error<br>
<br><pre>ERROR erlang code crashed:<br> File: /home/owner/Desktop/erlang/yaws/mask/mask.yaws:1<br>Reason: {{case_clause,undefined},<br> [{m5,out,1},<br> {yaws_server,deliver_dyn_part,8},<br> {yaws_server,aloop,3},<br>
{yaws_server,acceptor0,2},<br> {proc_lib,init_p_do_apply,3}]}<br>Req: {http_request,'GET',<br> {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"},<br>
{1,1}}<br>Stack: [{m5,out,1},<br> {yaws_server,deliver_dyn_part,8},<br> {yaws_server,aloop,3},<br> {yaws_server,acceptor0,2<br> {proc_lib,init_p_do_apply,3}]</pre><br>Any help would be appreciated.<br>
<br>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://www.erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://www.erlang.org/mailman/listinfo/erlang-questions</a><br></blockquote></div><br>