catch common exceptions