* limitations under the License.
*/
+#include <exception>
#include <tizen.h>
#include <service_app.h>
service_app_add_event_handler(&handlers[APP_EVENT_LANGUAGE_CHANGED], APP_EVENT_LANGUAGE_CHANGED, service_app_lang_changed, &ad);
service_app_add_event_handler(&handlers[APP_EVENT_REGION_FORMAT_CHANGED], APP_EVENT_REGION_FORMAT_CHANGED, service_app_region_changed, &ad);
- int ret = service_app_main(argc, argv, &event_callback, ad);
+ int ret = 0;
+ try {
+ ret = service_app_main(argc, argv, &event_callback, ad);
+ } catch (const std::exception& e) {
+ LOGE("Exception caught : %s", e.what());
+ }
LOGI("Main function exits with : %d", ret);
return ret;
}