Unification of error handling