Edgewall Software

Changes between Version 15 and Version 16 of TracDev/Exceptions


Ignore:
Timestamp:
Feb 23, 2016, 9:37:13 PM (8 years ago)
Author:
figaro
Comment:

Cosmetic changes

Legend:

Unmodified
Added
Removed
Modified
  • TracDev/Exceptions

    v15 v16  
     1[[PageOutline(2-3,Contents)]]
     2
    13= Exceptions
    24
     5In programming '''exceptions''' are conditions of the program that require special processing. Handling exceptions is important, because to the user the program should function as if it were in a normal state whereby any exceptions that are encountered are handled in the background. See also [wikipedia:Exception_handling].
     6
     7This page lists the most common exceptions in Trac core and database communication.
     8
    39== Custom Trac Exceptions
     10
    411Trac defines a set of custom exception types:
    512
     
    6168But changing the existing hierarchy might be difficult without breaking backward compatibility.
    6269
    63 == DB Exceptions
    64 We can catch [pep:0249#exceptions Python DB API exceptions] in a DB-neutral way. (Since Trac 1.0, see #6348.)
     70== Database Exceptions
     71
     72We can catch [pep:0249#exceptions Python DB API exceptions] in a database neutral way. (Since Trac 1.0, see #6348.)
    6573{{{#!python
    6674try:
     
    7078    ...
    7179}}}
     80
    7281The above example catches `sqlite.IntegrityError`, `MySQLdb.IntegrityError` or `psycopg.IntegrityError`,
    7382depending on the selected DatabaseBackend.
    7483
    75 
    7684----
    7785See [query:keywords~=exception tickets]