I am trying to write a simple Thrift server in Erlang that takes a string and returns a string.
Everything seems to work until the moment my function is called:
handle_function(Function, Args) when is_atom(Function), is_tuple(Args) -> case apply(?MODULE, Function, tuple_to_list(Args)) of ok -> ok; Reply -> {reply, Reply} end. test([X]) -> "You sent: " ++ X.
I get function_clause. The stack trace shows the following:
{function_clause, [{server, test, [& L; <"w00t" β]},
{server, handle_function, 2}, ...
My handle_function is copied from the training file, so I wonβt be surprised if I need to fine-tune it. Any ideas?
source share