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
Due to the reasons discussed here we will be moving to python-forum.io/ on October 1 2016
This forum will be locked down and no one will be able to post/edit/create threads, etc. here from thereafter. Please create an account at the new site to continue discussion.
User avatar
Yoriz
 
Posts: 1670
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: No registered users and 8 guests