Edgewall Software

Changes between Version 7 and Version 8 of TracDev/Exceptions


Ignore:
Timestamp:
Apr 4, 2014, 7:37:13 AM (10 years ago)
Author:
Ryan J Ollos
Comment:

Changes to hierarchy from #11568.

Legend:

Unmodified
Added
Removed
Modified
  • TracDev/Exceptions

    v7 v8  
    55
    66* ''Exception''
    7   * [=#TracError `TracError`] ([source:trunk/trac/core.py#/TracError trac.core]): Exception base class for errors in Trac.
    8     * [=#AdminCommandError `AdminCommandError`] ([source:trunk/trac/admin/api.py#/AdminCommandError trac.admin.api]): Exception raised when an admin command cannot be executed.
    9     * [=#ConfigurationError `ConfigurationError`] ([source:trunk/trac/config.py#/ConfigurationError trac.config]): Exception raised when a value in the configuration file is not valid.
    10     * [=#InvalidAttachment `InvalidAttachment`] ([source:trunk/trac/attachment.py#/InvalidAttachment trac.attachment]): Exception raised when attachment validation fails.
    11     * [=#InvalidTicket `InvalidTicket`] ([source:trunk/trac/ticket/web_ui.py#/InvalidTicket trac.ticket.web_ui]): Exception raised when a ticket fails validation.
    12     * [=#InvalidWikiPage `InvalidWikiPage`] ([source:trunk/trac/wiki/web_ui.py#/InvalidWikiPage trac.wiki.web_ui]): Exception raised when a Wiki page fails validation. Not used anymore since 0.11
    13     * [=#ProcessorError `ProcessorError`] ([source:trunk/trac/wiki/formatter.py#/ProcessorError trac.wiki.formatter])
    14     * [=#QuerySyntaxError `QuerySyntaxError`] ([source:trunk/trac/ticket/query.py#/QuerySyntaxError trac.ticket.query]): Exception raised when a ticket query cannot be parsed from a string.
    15     * [=#QueryValueError `QueryValueError`] ([source:trunk/trac/ticket/query.py#/QueryValueError trac.ticket.query]): Exception raised when a ticket query has bad constraint values.
    16     * [=#ResourceNotFound `ResourceNotFound`] ([source:trunk/trac/resource.py#/ResourceNotFound trac.resource]): Thrown when a non-existent resource is requested
    17     * [=#TimeoutError `TimeoutError`] ([source:trunk/trac/db/pool.py#/TimeoutError trac.db.pool]): Exception raised by the connection pool when no connection has become available after a given timeout (Prior to 1.0.2dev-r12305, inherited directly from `Exception`).
    18   * ''!StandardError''
     7  * [=#TracBaseError `TracBaseError`] ([source:trunk/trac/core.py#/TracBaseError trac.core]): Exception base class for errors in Trac.
     8    * [=#TracError `TracError`] ([source:trunk/trac/core.py#/TracError trac.core]): Standard Exception for errors in Trac.
     9      * [=#AdminCommandError `AdminCommandError`] ([source:trunk/trac/admin/api.py#/AdminCommandError trac.admin.api]): Exception raised when an admin command cannot be executed.
     10      * [=#ConfigurationError `ConfigurationError`] ([source:trunk/trac/config.py#/ConfigurationError trac.config]): Exception raised when a value in the configuration file is not valid.
     11      * [=#InvalidAttachment `InvalidAttachment`] ([source:trunk/trac/attachment.py#/InvalidAttachment trac.attachment]): Exception raised when attachment validation fails.
     12      * [=#InvalidTicket `InvalidTicket`] ([source:trunk/trac/ticket/web_ui.py#/InvalidTicket trac.ticket.web_ui]): Exception raised when a ticket fails validation.
     13      * [=#InvalidWikiPage `InvalidWikiPage`] ([source:trunk/trac/wiki/web_ui.py#/InvalidWikiPage trac.wiki.web_ui]): Exception raised when a Wiki page fails validation. Not used anymore since 0.11
     14      * [=#ProcessorError `ProcessorError`] ([source:trunk/trac/wiki/formatter.py#/ProcessorError trac.wiki.formatter])
     15      * [=#QuerySyntaxError `QuerySyntaxError`] ([source:trunk/trac/ticket/query.py#/QuerySyntaxError trac.ticket.query]): Exception raised when a ticket query cannot be parsed from a string.
     16      * [=#QueryValueError `QueryValueError`] ([source:trunk/trac/ticket/query.py#/QueryValueError trac.ticket.query]): Exception raised when a ticket query has bad constraint values.
     17      * [=#ResourceNotFound `ResourceNotFound`] ([source:trunk/trac/resource.py#/ResourceNotFound trac.resource]): Thrown when a non-existent resource is requested
     18      * [=#TimeoutError `TimeoutError`] ([source:trunk/trac/db/pool.py#/TimeoutError trac.db.pool]): Exception raised by the connection pool when no connection has become available after a given timeout (Prior to 1.0.2dev-r12305, inherited directly from `Exception`).
     19    * [=#HTTPException `HTTPException`] ([source:trunk/trac/web/api.py#/HTTPException trac.web.api]): Representing a HTTP status code
     20    * [=#RequestDone `RequestDone`] ([source:trunk/trac/web/api.py#/RequestDone trac.web.api]): Marker exception that indicates whether request processing has completed and a response was sent.
     21    * [=#ParseError `ParseError`] ([source:trunk/trac/versioncontrol/svn_authz.py#/ParseError trac.versioncontrol.svn_authz]): Exception thrown for parse errors in authz files
     22    * [=#GitError `GitError`] ([source:trunk/tracopt/versioncontrol/git/PyGIT.py#/GitError tracopt.versioncontrol.git.PyGIT])
     23      * [=#GitErrorSha `GitErrorSha`] ([source:trunk/tracopt/versioncontrol/git/PyGIT.py#/GitErrorSha tracopt.versioncontrol.git.PyGIT])
     24    * [=#Error `Error`] ([source:trunk/trac/db/tests/api.py#/Error trac.db.tests.api])
     25  * ''!StandardError'', `TracBaseError`
    1926    * [=#PermissionError `PermissionError`] ([source:trunk/trac/perm.py#/PermissionError trac.perm]): Insufficient permissions to complete the operation
    20     * ''!RuntimeError''
     27  * ''!StandardError'',
     28    * ''!RuntimeError'', `TracBaseError`
    2129      * [=#BackupError `BackupError`] ([source:trunk/trac/env.py#/BackupError trac.env]): Exception raised during an upgrade when the DB backup fails.
    22   * [=#HTTPException `HTTPException`] ([source:trunk/trac/web/api.py#/HTTPException trac.web.api]): Representing a HTTP status code
    23   * [=#RequestDone `RequestDone`] ([source:trunk/trac/web/api.py#/RequestDone trac.web.api]): Marker exception that indicates whether request processing has completed and a response was sent.
    24   * [=#ParseError `ParseError`] ([source:trunk/trac/versioncontrol/svn_authz.py#/ParseError trac.versioncontrol.svn_authz]): Exception thrown for parse errors in authz files
    25   * [=#GitError `GitError`] ([source:trunk/tracopt/versioncontrol/git/PyGIT.py#/GitError tracopt.versioncontrol.git.PyGIT])
    26     * [=#GitErrorSha `GitErrorSha`] ([source:trunk/tracopt/versioncontrol/git/PyGIT.py#/GitErrorSha tracopt.versioncontrol.git.PyGIT])
    27   * [=#Error `Error`] ([source:trunk/trac/db/tests/api.py#/Error trac.db.tests.api])
     30
     31Hierarchy is inconsistent, even after addition of `TracBaseError` class (#11568). There doesn't seem to be any consistent pattern in inheriting from `TracError`. Some exceptions also inherit from built-in exception classes other than `Exception`.
    2832
    2933There also seem to be multiple naming conventions. Consider following PEP:0008#exception-names.