HPCC-12031 Always throw exceptions if cannot allocate enough memory

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>