Changing if error with try{}catch{}