function error_handle

static int error_handle(int ex)