ZeroIntensity / view.py

The Batteries-Detachable Web Framework
https://view.zintensity.dev
MIT License
205 stars 15 forks source link

Cleaner exceptions in route errors #123

Closed ZeroIntensity closed 7 months ago

ZeroIntensity commented 9 months ago

Improvement Description

This is unrelated to #120. For beginners looking to work on this issue, note that this is a problem to be fixed in C, not Python.

When an exception occurs in a route, the traceback isn't shown at all, and instead just the error message. This is better than nothing, but we could definitely do better. I'm thinking we could use Rich Tracebacks to make it especially nice to use.

The cause of this issue is actually desired behavior, it's just a stupid design choice on my part. Right now, PyErr_Display is used to display the exception, but that only displays the error (at least to my knowledge). If it's supposed to display the traceback, then this is a bug, and likely related to the PyAwaitable API.

Improvement Request Example API

N/A

Anything else?

No response

ZeroIntensity commented 7 months ago

This was implemented in Alpha 9.