Use try/catch instead.