I think the "error" is a message telling you that your addin has successfully prevented the file from being deleted. I don't think it is an error in your program.
I would agree, that this is not an "Error" in the form of a crash or unintended action.
But it displays as an error message and to a user they won't discern the difference. I would like to be able to give a more descriptive response like how to properly delete per our procedures by preventing this message and giving another.