{ok,RequestData,_} = rfc4627:decode(Arg#arg.clidata)
当它匹配的输出
rfc4627:decode(Arg#arg.clidata)
至
{ok,RequestData,_}
它给出了一个 {badmatch, ....} 错误
但是我复制了错误消息中的输出并匹配到
{ok,RequestData,_}
在 erlang shell 中,然后它匹配没有任何错误。
此错误仅随机发生。我想不出一个原因。有时它匹配并且代码可以正常工作而没有任何错误。有时它会给出错误并且偏航代码崩溃。
这是错误消息
<h2>Internal error, yaws code crashed</h2><br /><hr />
<pre>
ERROR erlang code threw an uncaught exception:
File: /usr/local/var/yaws/www/prime/yaws/session.yaws:1
Class: error
Exception: {badmatch,{ok,{obj,[{"action",<<"GET_SESSION_INFO">>}]},[]}}
Req: {http_request,'POST',{abs_path,"/prime/yaws/session.yaws"},{1,1}}
Stack: [{session,handle,2,
[{file,"/root/.yaws/yaws/default/session.erl"},{line,30}]},
{yaws_server,deliver_dyn_part,8,
[{file,"yaws_server.erl"},{line,2801}]},
{yaws_server,aloop,4,[{file,"yaws_server.erl"},{line,1215}]},
{yaws_server,acceptor0,2,[{file,"yaws_server.erl"},{line,1052}]},
{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]
</pre><hr />