Skip to content

Comment on The Ultimate Guide to Error Handling in Pythonparent

Comments

It gives you control over the output of your program (and as you mention, the exact error code - which probably should be 1 in this instance).

It's often more user friendly to print a short human-readable message (or nothing) than to dump a huge stack trace. YMMV, if this is an internal dev tool then the opposite might be true!

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.