add two ret_on_fail

Signed-off-by: xiehuc <xiehuc@gmail.com>