I have simple middleware which checks if the HTML in the response is valid or not.
If the HTML is not valid an html is not valid" exception gets raised in development systems.
Up to now the xception contains the URL and the validation error.
Then the developer sees the URL in the well known yellow and gray django debug page.
Maybe I am blind, but if I look at the django debug page, I can't see which of my methods/views created the content with the broken html.
Is there a way to add more information to the "html is not valid" exception, to assist the developer? The developer should find the relevant method/view easier.