core: Fix exception handling

Explicit exception handling should be done

Change-Id: I455378d79e2ee2232f96dc18c10b010f954ca3be
Signed-off-by: Yair Zaslavsky <yzaslavs@redhat.com>