changed the thrown type on the exception from a pointer to a const reference.