catch runtime error cpp