X-Git-Url: http://developer.intra2net.com/git/?p=libt2n;a=blobdiff_plain;f=example-codegen%2Fclient.cpp;h=f7d94eab02e7f62050738e72bf67ba6c2c28b097;hp=10d2e52d7d2d65144fa17e6a434f3ab0f36e7361;hb=70e3d35c116c6483a8c78d2296122f2f90835349;hpb=9d3993e555cad0553a9e5743cfb7e1586139481c diff --git a/example-codegen/client.cpp b/example-codegen/client.cpp index 10d2e52..f7d94ea 100644 --- a/example-codegen/client.cpp +++ b/example-codegen/client.cpp @@ -14,7 +14,16 @@ int main(int argc, char** argv) libt2n::socket_client_connection sc("./socket"); cmd_group_default_client cc(sc); - return ( ( cc.testfunc("hello") == "hello, testfunc() was here" ) + bool throwok=false; + try + { + cc.testfunc("throw"); + }catch(libt2n::t2n_runtime_error &e){ + throwok=(std::string(e.what())=="throw me around"); + } + + return ( throwok + && ( cc.testfunc("hello") == "hello, testfunc() was here" ) && ( cc.testfunc_ref("hello") == "hello, testfunc() was here" ) && ( cc.t2(10) == 10 ) && ( cc.t3(10, 20, "hello", std::pair(10,20)) ) )