Qix-/better-exceptions

Options for colorizing the output.

Open

#51 aperta il 19 ott 2017

Vedi su GitHub
 (9 commenti) (0 reazioni) (0 assegnatari)Python (210 fork)batch import
enhancementhelp wanted

Metriche repository

Star
 (4489 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

I just wanted to show you what I did, and secondly get your opinion on an enhancement. See https://github.com/sentientmachine/better-exceptions/blob/master/README.md

I like it when the line numbers pop out so it draws my eye, so I did that in the link above.

Enhancement suggestion: these python errors/warnings are all well documented and well known. What if better-exceptions had a feature that would read the error message, read the code that committed it and return a more easily understood error message and a quick one or two line code snippet to show you what isn't allowed.

It would be most helpful for cryptic bugs that bubble-up implementationitis when you use numpy functions incorrectly and you get blasted in the face with incomprehensible error messages. Like for example matrix multiplications that say you can't invert a singular matrix. It gives you a 5 line refresher on why singular matrices can't be inverted.

Guida contributor