title: Python: Organization of user-defined exceptions in a complete project
body: <p>I have some questions about user-defined exceptions in Python and how they should be organized in a complete project.</p>
  
  <p>I have a fairly complex python project with some sub-packages that has the following structure (<code>__init__.py</code> omitted):</p>
  
  <pre><code>/docs (Documentation)
  /apidocs (generated API documentation)
  /askindex (my application package)
      /test (Unit tests directory)
          test_utils.py
          ... (more tests)
      /workers (various worker classes)
          communicators.py
          processes.py
          threads.py
          utils.py
      main.py (contains the starting point)
      data_objects.py (various objects used all around the application)
      settings.py (settings of the application)
  README.txt
  </code></pre>
  
  <p>I would like to implement my own Exception to use them in the modules of the 'workers' package for specific errors.</p>
  
  <p>Where should I place these exceptions ? I know that I should have my own base exception which subclasses the standard Exception class and subclass it for my other exceptions. Should I create a new 'exceptions' module under 'workers' ? Put exception classes in the module in which they're raised ? In this case, where should I put my base class ? Is my application structure appropriated ?</p>
  
  <p>I am new to exceptions in Python, so please excuse me if the answer is obvious...</p>