Add exception param to static log_error.