stop application while throwing error