THRIFT-2633 remove 'this is a dummy struct' structs from generated erlang
client: erlang
patch: talentdeficit (alisdair sullivan)
removes dummy struct info clauses from generated code and replaces
them with error that matches other undefined structs. adds error
for non-existent functions to function_info/2
diff --git a/lib/erl/src/thrift_client.erl b/lib/erl/src/thrift_client.erl
index c91c3ea..ff5c3dc 100644
--- a/lib/erl/src/thrift_client.erl
+++ b/lib/erl/src/thrift_client.erl
@@ -67,7 +67,9 @@
seqid = SeqId},
Function,
Args) ->
- Params = Service:function_info(Function, params_type),
+ Params = try Service:function_info(Function, params_type)
+ catch error:function_clause -> no_function
+ end,
case Params of
no_function ->
{Client, {error, {no_function, Function}}};