Make assert.has_error print the actual and expected errors on failure

It used to print "Expected error to be thrown." in the case of an error mismatch, which was misleading.
Now it always prints which error was caught and what was expected.