throw(ErrorIO &, ErrorIllegalState &, ErrorIllegalParameter &, ErrorSecurity &)
{
int rv = SCARD_ERROR_OK;
+
if (getSession()->getReader()->isSecureElementPresent() == true)
{
Message msg;
break;
}
- snprintf(text, sizeof(text), "Message [%s, %d], param1 [%d], param2 [%d], error [%d], caller [%p], callback [%p], userParam [%p], data length [%d]", msg, message, param1, param2, error, caller, callback, userParam, data.getLength());
+ snprintf(text, sizeof(text), "Message [%s, %d], param1 [%ld], param2 [%ld], error [%ld], caller [%p], callback [%p], userParam [%p], data length [%d]", msg, message, param1, param2, error, caller, callback, userParam, data.getLength());
return (const char *)text;
}
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;
}