User defined exceptions

This is the place for queries that don't fit in any of the other categories.

User defined exceptions

Postby steadyonabix » Sat Feb 01, 2014 6:04 pm

Hi

Is it possible (or desirable) to create a module of User Defined Exceptions and then import that module into every other module in a project?

I'm wondering if this is a good idea and also would it lead to circular references with the imports?


Brad
steadyonabix
 
Posts: 6
Joined: Tue Dec 31, 2013 1:11 pm

Re: User defined exceptions

Postby Yoriz » Sat Feb 01, 2014 6:19 pm

Yea no worries, here is an example of a project doing that
sqlalchemy/exc.py
New Users, Read This
Join the #python-forum IRC channel on irc.freenode.net!
Image
User avatar
Yoriz
 
Posts: 1052
Joined: Fri Feb 08, 2013 1:35 am
Location: UK

Re: User defined exceptions

Postby steadyonabix » Sat Feb 01, 2014 6:49 pm

Thanks

That's good to know.

Good example too :)
steadyonabix
 
Posts: 6
Joined: Tue Dec 31, 2013 1:11 pm


Return to General Coding Help

Who is online

Users browsing this forum: DecaK and 5 guests