You can use the custom error function to publish a custom error message from a custom driver.
void IdlPublishCustomErrorMessage(IdlDev *dev, IdlDatapoint *dp, char *errorMsg);