use __func__ in error reporting functions