try to under stand how to catch error in cpp