added support for customer error messages in the constructor.