Changed some error throwing to when.reject.  For some reason throw sometimes works with when and sometimes does not.