Best Method of Error Handling

K

Kamilche

I'm totally new to Python error handling. I see there are many, many
ways to handle errors in Python. What is the standard accepted 'best
practice'?

I will be writing unit tests for every module, and translating into
different languages. If I call everything an 'Exception', I can easily
load the messages from a text file... if I finely divide all the
errors up into separate error classes, I can't load from a text file
at run time. Or maybe I can, and I just don't see it.

Thanks for your time!

--Kamilche
 
A

Aahz

I'm totally new to Python error handling. I see there are many, many
ways to handle errors in Python. What is the standard accepted 'best
practice'?

I will be writing unit tests for every module, and translating into
different languages. If I call everything an 'Exception', I can easily
load the messages from a text file... if I finely divide all the
errors up into separate error classes, I can't load from a text file
at run time. Or maybe I can, and I just don't see it.

Read through the code in /Lib/ -- you'll see many examples.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top