Proper way to handle errors in a module

Andrew Berg bahamutzero8825 at gmail.com
Wed May 11 13:29:50 EDT 2011


I'm a bit new to programming outside of shell scripts (and I'm no expert
there), so I was wondering what is considered the best way to handle
errors when writing a module. Do I just let exceptions go and raise
custom exceptions for errors that don't trigger a standard one? Have the
function/method return nothing or a default value and show an error
message? I'm sure there's not a clear-cut answer, but I was just
wondering what most developers would expect a module to do in certain
situations.



More information about the Python-list mailing list