improve error handling

Properly handle ierr > 0 "warnings" returned by dpchfe upon evaluation.
Report ierr value as the error's code upon an internal error.
test for invalid numeric arrays
add test infrastructure