Fix the prevent problem.
authorWonkyu Kwon <wonkyu.kwon@samsung.com>
Fri, 5 Apr 2013 08:43:03 +0000 (17:43 +0900)
committerWonkyu Kwon <wonkyu.kwon@samsung.com>
Fri, 5 Apr 2013 09:11:23 +0000 (18:11 +0900)
 - (CID 44368) add catching exception coode

Change-Id: Ibf729869c87766e9590e614545262db02057efef

test-client/test-client.cpp

index 1f6c14f..d55d0fe 100644 (file)
@@ -216,13 +216,25 @@ void testConnectedCallback(SEServiceHelper *service, void *userData)
 
 int main(int argv, char *args[])
 {
-       SEService *service = new SEService((void *)&user_context, &testEventHandler);
+       SEService *service = NULL;
 
-       loop = g_main_new(TRUE);
-       g_main_loop_run(loop);
+       try
+       {
+               service = new SEService((void *)&user_context, &testEventHandler);
+       }
+       catch (...)
+       {
+               SCARD_DEBUG_ERR("exception raised!!!");
+       }
 
        if (service != NULL)
-               delete service;
+       {
+               loop = g_main_new(TRUE);
+               g_main_loop_run(loop);
+
+               if (service != NULL)
+                       delete service;
+       }
 
        return 0;
 }