|
@@ -143,9 +143,10 @@ static void on_log(void *inst,
|
|
|
arr, ent->cfg->name, ent->mod->cfg->name, msg);
|
|
|
}
|
|
|
}
|
|
|
- catch (const std::exception&)
|
|
|
+ catch (const std::exception& ex)
|
|
|
{
|
|
|
-
|
|
|
+ Dbg("Exception occurs: %s at <%s>[%d]{%s}", ex.what(), __FUNCTION__, __LINE__, _GetFileName(__FILE__));
|
|
|
+ //std::terminate();
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -164,7 +165,10 @@ static void task_callback(threadpool_t *threadpool, void *arg, param_size_t para
|
|
|
pTask->Process();
|
|
|
pTask->DecRef();
|
|
|
}
|
|
|
- catch (...) {
|
|
|
+ catch (...)
|
|
|
+ {
|
|
|
+ Dbg("Exception occurs at <%s>[%d]{%s}", __FUNCTION__, __LINE__, _GetFileName(__FILE__));
|
|
|
+ //std::terminate();
|
|
|
}
|
|
|
#else
|
|
|
GetSpModule()->SetThreadEntity(pEntity);
|
|
@@ -348,6 +352,7 @@ void SpEntity::on_entity_prestart(int trigger_entity_id, int argc, char *argv[])
|
|
|
pTransactionContext.Attach(new SpMUITransactionContext(this, SpMUITransactionContext::OP_START));
|
|
|
for (int i = 0; i < argc; ++i)
|
|
|
Args[i] = argv[i];
|
|
|
+ sp_dbg_debug("module version: %s", m_pEntityBase->GetEntityVersion());
|
|
|
m_pEntityBase->OnPreStart(Args, pTransactionContext);
|
|
|
}
|
|
|
|
|
@@ -395,10 +400,8 @@ void SpEntity::on_entity_redirect_subscribe(sp_uid_t *uid, int from_entity_id, c
|
|
|
|
|
|
void SpEntity::__on_entity_prestart(sp_mod_entity_stub_t *, int trigger_entity_id, int argc, char *argv[], void *user_data)
|
|
|
{
|
|
|
- sp_dbg_debug("==> %s", __FUNCTION__);
|
|
|
SpEntity *pThis = static_cast<SpEntity*>(user_data);
|
|
|
pThis->on_entity_prestart(trigger_entity_id, argc, argv);
|
|
|
- sp_dbg_debug("<== %s", __FUNCTION__);
|
|
|
}
|
|
|
|
|
|
void SpEntity::__on_entity_stop(sp_mod_entity_stub_t *, int trigger_entity_id, int cause_code, void *user_data)
|
|
@@ -460,7 +463,9 @@ int SpEntity::on_accept(int epid, int svc_id, int conn_id, iobuffer_t **conn_pkt
|
|
|
try {
|
|
|
m_redirect_entity_cache = NULL; // user can set entity_cache value in OnNewSession by invoking RedirectSession method
|
|
|
pServerSessionBase = m_pEntityBase->OnNewSession(remote_ent->cfg->name, pszParam);
|
|
|
- } catch (...) {
|
|
|
+ } catch (...)
|
|
|
+ {
|
|
|
+ Dbg("Exception occurs at <%s>[%d]{%s}", __FUNCTION__, __LINE__, _GetFileName(__FILE__));
|
|
|
Error = Error_Exception;
|
|
|
}
|
|
|
FREE(pszParam);
|