Added a method to allow the user to add their own error messages.