I want to get the file which created the error when the find command was run

I want to get the file which created the error when the find command was run ?

I am wrote a script to mail a list of files whose file size is ge than 0 and returns 0
but wen it finds a folder with only empty files it exits as 1. i need to modify it so that the return for this is also 0 (but it shoudn't mail.)

currently : for empty files it returns 1 and working fine
Please suggest me the changes i can do on it !!

my script :- (it is a gereric code !!)
find $1 \( -type f -size +0c \) | xargs tar cvf $NAME 2> /dev/null

What OS are you using? And what shell? This line scares me:
find $1 \( -type f -size +0c \) | xargs tar cvf $NAME 2> /dev/null

Remember that xargs only collects enough filenames to file a command line, then it repeats. If you have a lot of files, or files with very long names, you may get several separate runs of tar.

If there are no files, tar should complain and exit with a code of 1. You save the code in ERR_HAN. Then you test it. If the code is non-zero, you explicitly do "exit 1". Is this your complaint? Just don't do that.