librdf_internal_test_error function

For internal testing, not part of public API