Skip to content

Commit

Permalink
[orchagent]: Remove try/catch for correct coredump file (sonic-net#790)
Browse files Browse the repository at this point in the history
Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>
  • Loading branch information
jipanyang authored and Shuotian Cheng committed Jun 5, 2019
1 parent 819a122 commit 8f52eb3
Showing 1 changed file with 12 additions and 23 deletions.
35 changes: 12 additions & 23 deletions orchagent/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -276,33 +276,22 @@ int main(int argc, char **argv)

auto orchDaemon = make_shared<OrchDaemon>(&appl_db, &config_db, &state_db);

try
if (!orchDaemon->init())
{
if (!orchDaemon->init())
{
SWSS_LOG_ERROR("Failed to initialize orchstration daemon");
exit(EXIT_FAILURE);
}

/*
* In syncd view comparison solution, apply view has been sent
* immediately after restore is done
*/
if (!WarmStart::isWarmStart())
{
syncd_apply_view();
}

orchDaemon->start();
}
catch (char const *e)
{
SWSS_LOG_ERROR("Exception: %s", e);
SWSS_LOG_ERROR("Failed to initialize orchstration daemon");
exit(EXIT_FAILURE);
}
catch (exception& e)

/*
* In syncd view comparison solution, apply view has been sent
* immediately after restore is done
*/
if (!WarmStart::isWarmStart())
{
SWSS_LOG_ERROR("Failed due to exception: %s", e.what());
syncd_apply_view();
}

orchDaemon->start();

return 0;
}

0 comments on commit 8f52eb3

Please sign in to comment.