use grunt function to generate error