The subVI "Error check.vi" generate user errors calling "Personal_Error_Handler.vi".
Block diagram of the Error check subvi
You can use this Personal Error Handler in place of any uses for the General Error Handler or Simple Error Handler where you want personal errors to be included. Edit the two arrays to be the errors you wish to report, remembering that LabVIEW reserves error codes 5000 to 10000 for users. Make sure that you "Make Current Values Default" before you save so you don't lose your edits!
This subVI I've downloaded from National Instruments forum.
Block diagram of the Personal_Error_Handler.vi
I've only defined error codes and description of errors. The error codes are defined in the range 5000 - 5004.