change exception throw to use copy constructor rather than assignment to initialize exception instance