call function error before