Move exception handler in a provider