Ensuring error message contains method name