how to handle errors in unity