Unify exception handling