X-Git-Url: http://plrg.eecs.uci.edu/git/?p=iot2.git;a=blobdiff_plain;f=iotjava%2Fiotrmi%2FC%2B%2B%2Fsample%2FTestClass_Skeleton.cpp;h=e16c727dcc04c0dc237fb14ce3802c6ecf5503f3;hp=4fcfe314ba75034868a79065b32b4051f23cbc81;hb=5a7d4eedcbd0c282dadee08202f527e60a31c79e;hpb=f9649f72cc5f7232a6b62bd4e13fee39580ab471 diff --git a/iotjava/iotrmi/C++/sample/TestClass_Skeleton.cpp b/iotjava/iotrmi/C++/sample/TestClass_Skeleton.cpp index 4fcfe31..e16c727 100644 --- a/iotjava/iotrmi/C++/sample/TestClass_Skeleton.cpp +++ b/iotjava/iotrmi/C++/sample/TestClass_Skeleton.cpp @@ -7,10 +7,15 @@ using namespace std; int main(int argc, char *argv[]) { - - int port = 5010; - TestClassInterface *tc = new TestClass(3, 5.0, "7911"); - TestClass_Skeleton *tcSkel = new TestClass_Skeleton(tc, port); + TestClassInterface *tc; + TestClass_Skeleton *tcSkel; + try { + int port = 5010; + tc = new TestClass(3, 5.0, "7911"); + tcSkel = new TestClass_Skeleton(tc, port); + } catch(const exception&) { + return EXIT_FAILURE; + } //tcSkel->waitRequestInvokeMethod(); delete tc;