In a closed-loop process control system featuring negative feedback, what is the function of the error detector within the controller?