| David Reiss | 702019c | 2008-06-11 00:58:13 +0000 | [diff] [blame] | 1 | Example session using thrift_client: | 
|  | 2 |  | 
|  | 3 | 118> f(), {ok, C} = thrift_client:start_link("localhost", 9090, thriftTest_thrif | 
|  | 4 | t). | 
|  | 5 | {ok,<0.271.0>} | 
|  | 6 | 119> thrift_client:call(C, testVoid, []). | 
|  | 7 | {ok,ok} | 
|  | 8 | 120> thrift_client:call(C, testVoid, [asdf]). | 
|  | 9 | {error,{bad_args,testVoid,[asdf]}} | 
|  | 10 | 121> thrift_client:call(C, testI32, [123]). | 
|  | 11 | {ok,123} | 
|  | 12 | 122> thrift_client:call(C, testAsync, [1]). | 
|  | 13 | {ok,ok} | 
|  | 14 | 123> catch thrift_client:call(C, testXception, ["foo"]). | 
|  | 15 | {error,{no_function,testXception}} | 
|  | 16 | 124> catch thrift_client:call(C, testException, ["foo"]). | 
|  | 17 | {ok,ok} | 
|  | 18 | 125> catch thrift_client:call(C, testException, ["Xception"]). | 
|  | 19 | {xception,1001,"This is an Xception"} | 
|  | 20 | 126> thrift_client:call(C, testException, ["Xception"]). | 
|  | 21 |  | 
|  | 22 | =ERROR REPORT==== 24-Feb-2008::23:00:23 === | 
|  | 23 | Error in process <0.269.0> with exit value: {{nocatch,{xception,1001,"This is an | 
|  | 24 | Xception"}},[{thrift_client,call,3},{erl_eval,do_apply,5},{shell,exprs,6},{shel | 
|  | 25 | l,eval_loop,3}]} | 
|  | 26 |  | 
|  | 27 | ** exited: {{nocatch,{xception,1001,"This is an Xception"}}, | 
|  | 28 | [{thrift_client,call,3}, | 
|  | 29 | {erl_eval,do_apply,5}, | 
|  | 30 | {shell,exprs,6}, | 
|  | 31 | {shell,eval_loop,3}]} ** |