Generalized handling of errors during 'eval' tests