As suggested here in one of the answers, one can use the jinja2 debug.py to modify the traceback object.
I'm trying to raise an TypeError exception in my framework, and I don't want the raise line/frame to be shown in the traceback for the client in this case, as 'raise TypeError("")' is not useful for them in my opinion. What is more important is which line in their code that caused the error.
If there is any other way to do this, that would be highly appreciated also. But from what I've learned already and watch in the code, jinja2 seems like the only option as of now.
How would I use the jinja2 debug.py together with my code to modify the traceback of an exception?