Use template for error messages.