make exceptions more generic