Added more detailed error message for syntax errors when generating doctest-based benchmarks.