exception handler for registration