How to raise custom error message or a snap

Hi,
Can some one let me know “How to raise custom error message or a snap”.
Thanks,
DK

@deepak.shaw Go to view tab in snap and make configuration “Route Error Data To Error View”. Then add mapper in error view and add whatever error message you want. This is simplest way you can achieve custom error message.
If you want to explicitly raise any error can use “Exit” snap and choose the no of doc “1” or what ever you want.