Add support for new_secret - also properly qualify \Exception in a
few places.