add noreturn attribute to func error