Revert "THRIFT-3834 Erlang namespacing and exception metadata"
This reverts commit c8deed8cba62dce0ce816afef38f708ce49d0a61.
diff --git a/test/erl/src/test_thrift_server.erl b/test/erl/src/test_thrift_server.erl
index f3ed2f7..f504c73 100644
--- a/test/erl/src/test_thrift_server.erl
+++ b/test/erl/src/test_thrift_server.erl
@@ -107,10 +107,10 @@
{reply, S};
handle_function(testStruct,
- {Struct = #'thrift.test.Xtruct'{string_thing = String,
- byte_thing = Byte,
- i32_thing = I32,
- i64_thing = I64}})
+ {Struct = #'Xtruct'{string_thing = String,
+ byte_thing = Byte,
+ i32_thing = I32,
+ i64_thing = I64}})
when is_binary(String),
is_integer(Byte),
is_integer(I32),
@@ -119,8 +119,8 @@
{reply, Struct};
handle_function(testNest,
- {Nest}) when is_record(Nest, 'thrift.test.Xtruct2'),
- is_record(Nest#'thrift.test.Xtruct2'.struct_thing, 'thrift.test.Xtruct') ->
+ {Nest}) when is_record(Nest, 'Xtruct2'),
+ is_record(Nest#'Xtruct2'.struct_thing, 'Xtruct') ->
io:format("testNest: ~p~n", [Nest]),
{reply, Nest};
@@ -159,22 +159,22 @@
{-4, dict:from_list(NegList)}]),
{reply, MapMap};
-handle_function(testInsanity, {Insanity}) when is_record(Insanity, 'thrift.test.Insanity') ->
- Hello = #'thrift.test.Xtruct'{string_thing = <<"Hello2">>,
- byte_thing = 2,
- i32_thing = 2,
- i64_thing = 2},
+handle_function(testInsanity, {Insanity}) when is_record(Insanity, 'Insanity') ->
+ Hello = #'Xtruct'{string_thing = <<"Hello2">>,
+ byte_thing = 2,
+ i32_thing = 2,
+ i64_thing = 2},
- Goodbye = #'thrift.test.Xtruct'{string_thing = <<"Goodbye4">>,
- byte_thing = 4,
- i32_thing = 4,
- i64_thing = 4},
- Crazy = #'thrift.test.Insanity'{
- userMap = dict:from_list([{?THRIFT_TEST_NUMBERZ_EIGHT, 8}]),
- xtructs = [Goodbye]
- },
+ Goodbye = #'Xtruct'{string_thing = <<"Goodbye4">>,
+ byte_thing = 4,
+ i32_thing = 4,
+ i64_thing = 4},
+ Crazy = #'Insanity'{
+ userMap = dict:from_list([{?THRIFT_TEST_NUMBERZ_EIGHT, 8}]),
+ xtructs = [Goodbye]
+ },
- Looney = #'thrift.test.Insanity'{},
+ Looney = #'Insanity'{},
FirstMap = dict:from_list([{?THRIFT_TEST_NUMBERZ_TWO, Insanity},
{?THRIFT_TEST_NUMBERZ_THREE, Insanity}]),
@@ -196,16 +196,16 @@
is_integer(Arg5) ->
io:format("testMulti(~p)~n", [Args]),
- {reply, #'thrift.test.Xtruct'{string_thing = <<"Hello2">>,
- byte_thing = Arg0,
- i32_thing = Arg1,
- i64_thing = Arg2}};
+ {reply, #'Xtruct'{string_thing = <<"Hello2">>,
+ byte_thing = Arg0,
+ i32_thing = Arg1,
+ i64_thing = Arg2}};
handle_function(testException, {String}) when is_binary(String) ->
io:format("testException(~p)~n", [String]),
case String of
<<"Xception">> ->
- throw(#'thrift.test.Xception'{errorCode = 1001,
+ throw(#'Xception'{errorCode = 1001,
message = String});
<<"TException">> ->
throw({?TApplicationException_Structure});
@@ -217,14 +217,14 @@
io:format("testMultiException(~p, ~p)~n", [Arg0, Arg1]),
case Arg0 of
<<"Xception">> ->
- throw(#'thrift.test.Xception'{errorCode = 1001,
+ throw(#'Xception'{errorCode = 1001,
message = <<"This is an Xception">>});
<<"Xception2">> ->
- throw(#'thrift.test.Xception2'{errorCode = 2002,
+ throw(#'Xception2'{errorCode = 2002,
struct_thing =
- #'thrift.test.Xtruct'{string_thing = <<"This is an Xception2">>}});
+ #'Xtruct'{string_thing = <<"This is an Xception2">>}});
_ ->
- {reply, #'thrift.test.Xtruct'{string_thing = Arg1}}
+ {reply, #'Xtruct'{string_thing = Arg1}}
end;
handle_function(testOneway, {Seconds}) ->