私は小さなyaws appmodテストを持っています:
-module(webservice).
-include("../include/yaws_api.hrl").
-compile(export_all).
http(parse_query,Arg) ->
yaws_api:parse_query(Arg);
out(Arg) ->
{html, [http(parse_query,Arg)]}.
yaws_api:parse_query 関数を実行すると、yaws インタラクティブ モードから次のエラー レポートが表示されます。
Yaws process died: {function_clause,
[{yaws_server,binary_size,
[0,{"i",undefined}],
[{file,"yaws_server.erl"},{line,3015}]},
{yaws_server,binary_size,2,
[{file,"yaws_server.erl"},{line,3018}]},
{yaws_server,binary_size,2,
[{file,"yaws_server.erl"},{line,3018}]},
{yaws_server,deflate_accumulated,4,
[{file,"yaws_server.erl"},{line,3712}]},
{yaws_server,deliver_accumulated,4,
[{file,"yaws_server.erl"},{line,3666}]},
{yaws_server,finish_up_dyn_file,2,
[{file,"yaws_server.erl"},{line,2745}]},
{yaws_server,aloop,4,
[{file,"yaws_server.erl"},{line,1175}]},
{yaws_server,acceptor0,2,
[{file,"yaws_server.erl"},{line,1016}]}]}
appmod は config で次のようにセットアップされます。
<server localhost>
port = 8080
listen = 127.0.0.1
#docroot = /usr/share/yaws
docroot = /usr/lib/yaws/www
appmods = </,webservice>
# dir_listings = true
</server>