add exception handle to fix the bug
add exception handle to fix the bug

Signed-off-by: Wang Qilin <61a0fb5e67ecb1a6580c409197a068eae610aff6@huawei.com>

huawei-openlab/oct,liangchenye/oct,wangkirin/oct,wking/rkt-oci,zenlinTechnofreak/oct