Added more precise exceptions