Add function for error message to CLP