Allow the user to put a function in the structure to display error messages.