[query] provide a better error message in test_ndarray_solve (#10365)
[query] provide a better error message in test_ndarray_solve (#10365)

`exc` is a pytest exception holder. `exc.value` is the actual exception.

If pytest has to call `__str__(self)` on an object, pytest will automatically
truncate the result. However, pytest does not truncate `str` objects, that is
why I added a message to the assert and ensured that the message is already a
`str` before pytest sees it.
hail-is/hail,hail-is/hail,hail-is/hail,hail-is/hail,hail-is/hail,hail-is/hail,hail-is/hail,hail-is/hail