Fix the bug that cannot catch Runtime exception