HG-40: Fix interoperability with respect to scoped record names (#6)

* HG-40: Fix interoperability with respect to scoped record names

* HG-40: Provide build container with the newest thrift compiler
This commit is contained in:
Andrew Mayorov 2016-07-06 17:02:08 +03:00 committed by GitHub
parent c80d54c774
commit 302e829154
3 changed files with 9 additions and 8 deletions

View File

@ -17,5 +17,5 @@
{<<"ssl_verify_fun">>,{pkg,<<"ssl_verify_fun">>,<<"1.1.0">>},1},
{<<"thrift">>,
{git,"https://github.com/rbkmoney/thrift_erlang.git",
{ref,"a517cf67e2ba7458db498cad3ca0a983f834cc7e"}},
{ref,"1978d5a1e350694bfa3d2dc3a762176bc60c6e64"}},
0}].

View File

@ -233,12 +233,13 @@ handle_exception(State = #state{service = Service, transport_handler = Trans},
{ReplySpec, ExceptionTuple}, SeqId)
end.
get_except(Exception, {_Fid, _, {struct, exception, {Module, Type}}, _, _}, _) when
element(1, Exception) =:= Type
->
{Exception, {Module, Type}};
get_except(_, _, TypesModule) ->
{undefined, TypesModule}.
get_except(Exception, {_Fid, _, {struct, exception, {Module, Type}}, _, _}, TypesModule) ->
case Module:record_name(Type) of
Name when Name =:= element(1, Exception) ->
{Exception, {Module, Type}};
_ ->
{undefined, TypesModule}
end.
get_except_name(Module, Type) ->
{struct, exception, Fields} = Module:struct_info(Type),

View File

@ -1,5 +1,5 @@
box:
id: rbkmoney/build_erlang
id: rbkmoney/build
username: $USERNAME
password: $PASSWORD
tag: latest