]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
crimson/osd/main: catch exception thrown in the async() call
authorKefu Chai <kchai@redhat.com>
Sat, 29 May 2021 06:51:09 +0000 (14:51 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 31 May 2021 12:05:52 +0000 (20:05 +0800)
commita6314f154262e3eda2106c6004fea5de53808a4f
treef3ee72d97c1182e5edbed3d4b238176b41b85aa4
parent6eba570dbce495bbcac06d4525e0da456dfe69c2
crimson/osd/main: catch exception thrown in the async() call

* use seastar::app_template::run() instead of
  seastar::app_template::run_deprecated() for returning int,
  instead of returning `void`. so the application can return
  int explicitly in the continuation passed to run(). more
  readable this way.
* wrap the all the block in run() in a giant try-catch block,
  so the exceptions thrown by the startup code can be captured
  and handled.
* do not capture the exceptions individually, in the try-catch
  block anymore. the outer catch block takes care of them.

this change improves the error handling when crimson-osd launches.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crimson/osd/main.cc