Raise exception doctest build-finished handler if there was an error.

Refs #9874
Use correct type for method call.

Refs #9923
Merge branch 'feature/9874_doctest_xunit_output' into develop
Merge branch 'feature/9923_concepts_to_rst' into develop