File: exceptions.html

package info (click to toggle)
sqlalchemy 0.9.8%2Bdfsg-0.1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 23,952 kB
  • ctags: 24,534
  • sloc: python: 152,282; ansic: 1,346; makefile: 257; xml: 17
file content (464 lines) | stat: -rw-r--r-- 28,931 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        
        <title>
            
    
                Core Exceptions
             &mdash;
    SQLAlchemy 0.9 Documentation

        </title>

        
            <!-- begin iterate through SQLA + sphinx environment css_files -->
                <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
                <link rel="stylesheet" href="../_static/docs.css" type="text/css" />
                <link rel="stylesheet" href="../_static/sphinx_paramlinks.css" type="text/css" />
                <link rel="stylesheet" href="../_static/changelog.css" type="text/css" />
            <!-- end iterate through SQLA + sphinx environment css_files -->
        

        

    

    <!-- begin layout.mako headers -->

    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
          URL_ROOT:    '../',
          VERSION:     '0.9.8',
          COLLAPSE_MODINDEX: false,
          FILE_SUFFIX: '.html'
      };
    </script>

    <!-- begin iterate through sphinx environment script_files -->
        <script type="text/javascript" src="../_static/jquery.js"></script>
        <script type="text/javascript" src="../_static/underscore.js"></script>
        <script type="text/javascript" src="../_static/doctools.js"></script>
    <!-- end iterate through sphinx environment script_files -->

    <script type="text/javascript" src="../_static/detectmobile.js"></script>
    <script type="text/javascript" src="../_static/init.js"></script>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
        <link rel="copyright" title="Copyright" href="../copyright.html" />
    <link rel="top" title="SQLAlchemy 0.9 Documentation" href="../index.html" />
        <link rel="up" title="SQLAlchemy Core" href="index.html" />
        <link rel="next" title="Core Internals" href="internals.html" />
        <link rel="prev" title="Deprecated Event Interfaces" href="interfaces.html" />
    <!-- end layout.mako headers -->


    </head>
    <body>
        















<div id="docs-container">





<div id="docs-top-navigation-container" class="body-background">
<div id="docs-header">
    <div id="docs-version-header">
        Release: <span class="version-num">0.9.8</span> | Release Date: October 13, 2014
    </div>

    <h1>SQLAlchemy 0.9 Documentation</h1>

</div>
</div>

<div id="docs-body-container">

    <div id="fixed-sidebar" class="withsidebar">


        <div id="docs-sidebar-popout">
            <h3><a href="../index.html">SQLAlchemy 0.9 Documentation</a></h3>

            <p id="sidebar-paginate">
                    <a href="index.html" title="SQLAlchemy Core">Up</a> |

                    <a href="interfaces.html" title="Deprecated Event Interfaces">Prev</a> |
                    <a href="internals.html" title="Core Internals">Next</a>
            </p>

            <p id="sidebar-topnav">
                <a href="../index.html">Contents</a> |
                <a href="../genindex.html">Index</a>
            </p>

            <div id="sidebar-search">
                <form class="search" action="../search.html" method="get">
                  <input type="text" name="q" size="12" /> <input type="submit" value="Search" />
                  <input type="hidden" name="check_keywords" value="yes" />
                  <input type="hidden" name="area" value="default" />
                </form>
            </div>

        </div>

        <div id="docs-sidebar">

        <h3><a href="#">            
                Core Exceptions
            
        </a></h3>
        <ul>
<li><a class="reference internal" href="#">Core Exceptions</a></li>
</ul>




        </div>

    </div>

    

    <div id="docs-body" class="withsidebar" >
        
<div class="section" id="module-sqlalchemy.exc">
<span id="core-exceptions"></span><h1>Core Exceptions<a class="headerlink" href="#module-sqlalchemy.exc" title="Permalink to this headline">¶</a></h1>
<p>Exceptions used with SQLAlchemy.</p>
<p>The base exception class is <a class="reference internal" href="#sqlalchemy.exc.SQLAlchemyError" title="sqlalchemy.exc.SQLAlchemyError"><tt class="xref py py-exc docutils literal"><span class="pre">SQLAlchemyError</span></tt></a>.  Exceptions which are
raised as a result of DBAPI exceptions are all subclasses of
<a class="reference internal" href="#sqlalchemy.exc.DBAPIError" title="sqlalchemy.exc.DBAPIError"><tt class="xref py py-exc docutils literal"><span class="pre">DBAPIError</span></tt></a>.</p>
<dl class="exception">
<dt id="sqlalchemy.exc.AmbiguousForeignKeysError">
<em class="property">exception </em><tt class="descclassname">sqlalchemy.exc.</tt><tt class="descname">AmbiguousForeignKeysError</tt><a class="headerlink" href="#sqlalchemy.exc.AmbiguousForeignKeysError" title="Permalink to this definition">¶</a></dt>
<dd><p>Raised when more than one foreign key matching can be located
between two selectables during a join.</p>
</dd></dl>

<dl class="exception">
<dt id="sqlalchemy.exc.ArgumentError">
<em class="property">exception </em><tt class="descclassname">sqlalchemy.exc.</tt><tt class="descname">ArgumentError</tt><a class="headerlink" href="#sqlalchemy.exc.ArgumentError" title="Permalink to this definition">¶</a></dt>
<dd><p>Raised when an invalid or conflicting function argument is supplied.</p>
<p>This error generally corresponds to construction time state errors.</p>
</dd></dl>

<dl class="exception">
<dt id="sqlalchemy.exc.CircularDependencyError">
<em class="property">exception </em><tt class="descclassname">sqlalchemy.exc.</tt><tt class="descname">CircularDependencyError</tt><big>(</big><em>message</em>, <em>cycles</em>, <em>edges</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#sqlalchemy.exc.CircularDependencyError" title="Permalink to this definition">¶</a></dt>
<dd><p>Raised by topological sorts when a circular dependency is detected.</p>
<p>There are two scenarios where this error occurs:</p>
<ul class="simple">
<li>In a Session flush operation, if two objects are mutually dependent
on each other, they can not be inserted or deleted via INSERT or
DELETE statements alone; an UPDATE will be needed to post-associate
or pre-deassociate one of the foreign key constrained values.
The <tt class="docutils literal"><span class="pre">post_update</span></tt> flag described at <a class="reference internal" href="../orm/relationships.html#post-update"><em>Rows that point to themselves / Mutually Dependent Rows</em></a> can resolve
this cycle.</li>
<li>In a <a class="reference internal" href="metadata.html#sqlalchemy.schema.MetaData.create_all" title="sqlalchemy.schema.MetaData.create_all"><tt class="xref py py-meth docutils literal"><span class="pre">MetaData.create_all()</span></tt></a>, <a class="reference internal" href="metadata.html#sqlalchemy.schema.MetaData.drop_all" title="sqlalchemy.schema.MetaData.drop_all"><tt class="xref py py-meth docutils literal"><span class="pre">MetaData.drop_all()</span></tt></a>,
<a class="reference internal" href="metadata.html#sqlalchemy.schema.MetaData.sorted_tables" title="sqlalchemy.schema.MetaData.sorted_tables"><tt class="xref py py-attr docutils literal"><span class="pre">MetaData.sorted_tables</span></tt></a> operation, two <a class="reference internal" href="constraints.html#sqlalchemy.schema.ForeignKey" title="sqlalchemy.schema.ForeignKey"><tt class="xref py py-class docutils literal"><span class="pre">ForeignKey</span></tt></a>
or <a class="reference internal" href="constraints.html#sqlalchemy.schema.ForeignKeyConstraint" title="sqlalchemy.schema.ForeignKeyConstraint"><tt class="xref py py-class docutils literal"><span class="pre">ForeignKeyConstraint</span></tt></a> objects mutually refer to each
other.  Apply the <tt class="docutils literal"><span class="pre">use_alter=True</span></tt> flag to one or both,
see <a class="reference internal" href="constraints.html#use-alter"><em>Creating/Dropping Foreign Key Constraints via ALTER</em></a>.</li>
</ul>
</dd></dl>

<dl class="exception">
<dt id="sqlalchemy.exc.CompileError">
<em class="property">exception </em><tt class="descclassname">sqlalchemy.exc.</tt><tt class="descname">CompileError</tt><a class="headerlink" href="#sqlalchemy.exc.CompileError" title="Permalink to this definition">¶</a></dt>
<dd><p>Raised when an error occurs during SQL compilation</p>
</dd></dl>

<dl class="exception">
<dt id="sqlalchemy.exc.DBAPIError">
<em class="property">exception </em><tt class="descclassname">sqlalchemy.exc.</tt><tt class="descname">DBAPIError</tt><big>(</big><em>statement</em>, <em>params</em>, <em>orig</em>, <em>connection_invalidated=False</em><big>)</big><a class="headerlink" href="#sqlalchemy.exc.DBAPIError" title="Permalink to this definition">¶</a></dt>
<dd><p>Raised when the execution of a database operation fails.</p>
<p>Wraps exceptions raised by the DB-API underlying the
database operation.  Driver-specific implementations of the standard
DB-API exception types are wrapped by matching sub-types of SQLAlchemy&#8217;s
<a class="reference internal" href="#sqlalchemy.exc.DBAPIError" title="sqlalchemy.exc.DBAPIError"><tt class="xref py py-class docutils literal"><span class="pre">DBAPIError</span></tt></a> when possible.  DB-API&#8217;s <tt class="docutils literal"><span class="pre">Error</span></tt> type maps to
<a class="reference internal" href="#sqlalchemy.exc.DBAPIError" title="sqlalchemy.exc.DBAPIError"><tt class="xref py py-class docutils literal"><span class="pre">DBAPIError</span></tt></a> in SQLAlchemy, otherwise the names are identical.  Note
that there is no guarantee that different DB-API implementations will
raise the same exception type for any given error condition.</p>
<p><a class="reference internal" href="#sqlalchemy.exc.DBAPIError" title="sqlalchemy.exc.DBAPIError"><tt class="xref py py-class docutils literal"><span class="pre">DBAPIError</span></tt></a> features <a class="reference internal" href="#sqlalchemy.exc.StatementError.statement" title="sqlalchemy.exc.StatementError.statement"><tt class="xref py py-attr docutils literal"><span class="pre">statement</span></tt></a>
and <a class="reference internal" href="#sqlalchemy.exc.StatementError.params" title="sqlalchemy.exc.StatementError.params"><tt class="xref py py-attr docutils literal"><span class="pre">params</span></tt></a> attributes which supply context
regarding the specifics of the statement which had an issue, for the
typical case when the error was raised within the context of
emitting a SQL statement.</p>
<p>The wrapped exception object is available in the
<a class="reference internal" href="#sqlalchemy.exc.StatementError.orig" title="sqlalchemy.exc.StatementError.orig"><tt class="xref py py-attr docutils literal"><span class="pre">orig</span></tt></a> attribute. Its type and properties are
DB-API implementation specific.</p>
</dd></dl>

<dl class="exception">
<dt id="sqlalchemy.exc.DataError">
<em class="property">exception </em><tt class="descclassname">sqlalchemy.exc.</tt><tt class="descname">DataError</tt><big>(</big><em>statement</em>, <em>params</em>, <em>orig</em>, <em>connection_invalidated=False</em><big>)</big><a class="headerlink" href="#sqlalchemy.exc.DataError" title="Permalink to this definition">¶</a></dt>
<dd><p>Wraps a DB-API DataError.</p>
</dd></dl>

<dl class="exception">
<dt id="sqlalchemy.exc.DatabaseError">
<em class="property">exception </em><tt class="descclassname">sqlalchemy.exc.</tt><tt class="descname">DatabaseError</tt><big>(</big><em>statement</em>, <em>params</em>, <em>orig</em>, <em>connection_invalidated=False</em><big>)</big><a class="headerlink" href="#sqlalchemy.exc.DatabaseError" title="Permalink to this definition">¶</a></dt>
<dd><p>Wraps a DB-API DatabaseError.</p>
</dd></dl>

<dl class="exception">
<dt id="sqlalchemy.exc.DisconnectionError">
<em class="property">exception </em><tt class="descclassname">sqlalchemy.exc.</tt><tt class="descname">DisconnectionError</tt><a class="headerlink" href="#sqlalchemy.exc.DisconnectionError" title="Permalink to this definition">¶</a></dt>
<dd><p>A disconnect is detected on a raw DB-API connection.</p>
<p>This error is raised and consumed internally by a connection pool.  It can
be raised by the <a class="reference internal" href="events.html#sqlalchemy.events.PoolEvents.checkout" title="sqlalchemy.events.PoolEvents.checkout"><tt class="xref py py-meth docutils literal"><span class="pre">PoolEvents.checkout()</span></tt></a> event so that the host pool
forces a retry; the exception will be caught three times in a row before
the pool gives up and raises <a class="reference internal" href="#sqlalchemy.exc.InvalidRequestError" title="sqlalchemy.exc.InvalidRequestError"><tt class="xref py py-class docutils literal"><span class="pre">InvalidRequestError</span></tt></a>
regarding the connection attempt.</p>
</dd></dl>

<dl class="class">
<dt id="sqlalchemy.exc.DontWrapMixin">
<em class="property">class </em><tt class="descclassname">sqlalchemy.exc.</tt><tt class="descname">DontWrapMixin</tt><a class="headerlink" href="#sqlalchemy.exc.DontWrapMixin" title="Permalink to this definition">¶</a></dt>
<dd><p>A mixin class which, when applied to a user-defined Exception class,
will not be wrapped inside of <a class="reference internal" href="#sqlalchemy.exc.StatementError" title="sqlalchemy.exc.StatementError"><tt class="xref py py-exc docutils literal"><span class="pre">StatementError</span></tt></a> if the error is
emitted within the process of executing a statement.</p>
<p>E.g.:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">sqlalchemy.exc</span> <span class="kn">import</span> <span class="n">DontWrapMixin</span>

<span class="k">class</span> <span class="nc">MyCustomException</span><span class="p">(</span><span class="ne">Exception</span><span class="p">,</span> <span class="n">DontWrapMixin</span><span class="p">):</span>
    <span class="k">pass</span>

<span class="k">class</span> <span class="nc">MySpecialType</span><span class="p">(</span><span class="n">TypeDecorator</span><span class="p">):</span>
    <span class="n">impl</span> <span class="o">=</span> <span class="n">String</span>

    <span class="k">def</span> <span class="nf">process_bind_param</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">value</span><span class="p">,</span> <span class="n">dialect</span><span class="p">):</span>
        <span class="k">if</span> <span class="n">value</span> <span class="o">==</span> <span class="s">&#39;invalid&#39;</span><span class="p">:</span>
            <span class="k">raise</span> <span class="n">MyCustomException</span><span class="p">(</span><span class="s">&quot;invalid!&quot;</span><span class="p">)</span></pre></div>
</div>
</dd></dl>

<dl class="exception">
<dt id="sqlalchemy.exc.IdentifierError">
<em class="property">exception </em><tt class="descclassname">sqlalchemy.exc.</tt><tt class="descname">IdentifierError</tt><a class="headerlink" href="#sqlalchemy.exc.IdentifierError" title="Permalink to this definition">¶</a></dt>
<dd><p>Raised when a schema name is beyond the max character limit</p>
</dd></dl>

<dl class="exception">
<dt id="sqlalchemy.exc.IntegrityError">
<em class="property">exception </em><tt class="descclassname">sqlalchemy.exc.</tt><tt class="descname">IntegrityError</tt><big>(</big><em>statement</em>, <em>params</em>, <em>orig</em>, <em>connection_invalidated=False</em><big>)</big><a class="headerlink" href="#sqlalchemy.exc.IntegrityError" title="Permalink to this definition">¶</a></dt>
<dd><p>Wraps a DB-API IntegrityError.</p>
</dd></dl>

<dl class="exception">
<dt id="sqlalchemy.exc.InterfaceError">
<em class="property">exception </em><tt class="descclassname">sqlalchemy.exc.</tt><tt class="descname">InterfaceError</tt><big>(</big><em>statement</em>, <em>params</em>, <em>orig</em>, <em>connection_invalidated=False</em><big>)</big><a class="headerlink" href="#sqlalchemy.exc.InterfaceError" title="Permalink to this definition">¶</a></dt>
<dd><p>Wraps a DB-API InterfaceError.</p>
</dd></dl>

<dl class="exception">
<dt id="sqlalchemy.exc.InternalError">
<em class="property">exception </em><tt class="descclassname">sqlalchemy.exc.</tt><tt class="descname">InternalError</tt><big>(</big><em>statement</em>, <em>params</em>, <em>orig</em>, <em>connection_invalidated=False</em><big>)</big><a class="headerlink" href="#sqlalchemy.exc.InternalError" title="Permalink to this definition">¶</a></dt>
<dd><p>Wraps a DB-API InternalError.</p>
</dd></dl>

<dl class="exception">
<dt id="sqlalchemy.exc.InvalidRequestError">
<em class="property">exception </em><tt class="descclassname">sqlalchemy.exc.</tt><tt class="descname">InvalidRequestError</tt><a class="headerlink" href="#sqlalchemy.exc.InvalidRequestError" title="Permalink to this definition">¶</a></dt>
<dd><p>SQLAlchemy was asked to do something it can&#8217;t do.</p>
<p>This error generally corresponds to runtime state errors.</p>
</dd></dl>

<dl class="exception">
<dt id="sqlalchemy.exc.NoForeignKeysError">
<em class="property">exception </em><tt class="descclassname">sqlalchemy.exc.</tt><tt class="descname">NoForeignKeysError</tt><a class="headerlink" href="#sqlalchemy.exc.NoForeignKeysError" title="Permalink to this definition">¶</a></dt>
<dd><p>Raised when no foreign keys can be located between two selectables
during a join.</p>
</dd></dl>

<dl class="exception">
<dt id="sqlalchemy.exc.NoInspectionAvailable">
<em class="property">exception </em><tt class="descclassname">sqlalchemy.exc.</tt><tt class="descname">NoInspectionAvailable</tt><a class="headerlink" href="#sqlalchemy.exc.NoInspectionAvailable" title="Permalink to this definition">¶</a></dt>
<dd><p>A subject passed to <a class="reference internal" href="inspection.html#sqlalchemy.inspection.inspect" title="sqlalchemy.inspection.inspect"><tt class="xref py py-func docutils literal"><span class="pre">sqlalchemy.inspection.inspect()</span></tt></a> produced
no context for inspection.</p>
</dd></dl>

<dl class="exception">
<dt id="sqlalchemy.exc.NoReferenceError">
<em class="property">exception </em><tt class="descclassname">sqlalchemy.exc.</tt><tt class="descname">NoReferenceError</tt><a class="headerlink" href="#sqlalchemy.exc.NoReferenceError" title="Permalink to this definition">¶</a></dt>
<dd><p>Raised by <tt class="docutils literal"><span class="pre">ForeignKey</span></tt> to indicate a reference cannot be resolved.</p>
</dd></dl>

<dl class="exception">
<dt id="sqlalchemy.exc.NoReferencedColumnError">
<em class="property">exception </em><tt class="descclassname">sqlalchemy.exc.</tt><tt class="descname">NoReferencedColumnError</tt><big>(</big><em>message</em>, <em>tname</em>, <em>cname</em><big>)</big><a class="headerlink" href="#sqlalchemy.exc.NoReferencedColumnError" title="Permalink to this definition">¶</a></dt>
<dd><p>Raised by <tt class="docutils literal"><span class="pre">ForeignKey</span></tt> when the referred <tt class="docutils literal"><span class="pre">Column</span></tt> cannot be
located.</p>
</dd></dl>

<dl class="exception">
<dt id="sqlalchemy.exc.NoReferencedTableError">
<em class="property">exception </em><tt class="descclassname">sqlalchemy.exc.</tt><tt class="descname">NoReferencedTableError</tt><big>(</big><em>message</em>, <em>tname</em><big>)</big><a class="headerlink" href="#sqlalchemy.exc.NoReferencedTableError" title="Permalink to this definition">¶</a></dt>
<dd><p>Raised by <tt class="docutils literal"><span class="pre">ForeignKey</span></tt> when the referred <tt class="docutils literal"><span class="pre">Table</span></tt> cannot be
located.</p>
</dd></dl>

<dl class="exception">
<dt id="sqlalchemy.exc.NoSuchColumnError">
<em class="property">exception </em><tt class="descclassname">sqlalchemy.exc.</tt><tt class="descname">NoSuchColumnError</tt><a class="headerlink" href="#sqlalchemy.exc.NoSuchColumnError" title="Permalink to this definition">¶</a></dt>
<dd><p>A nonexistent column is requested from a <tt class="docutils literal"><span class="pre">RowProxy</span></tt>.</p>
</dd></dl>

<dl class="exception">
<dt id="sqlalchemy.exc.NoSuchModuleError">
<em class="property">exception </em><tt class="descclassname">sqlalchemy.exc.</tt><tt class="descname">NoSuchModuleError</tt><a class="headerlink" href="#sqlalchemy.exc.NoSuchModuleError" title="Permalink to this definition">¶</a></dt>
<dd><p>Raised when a dynamically-loaded module (usually a database dialect)
of a particular name cannot be located.</p>
</dd></dl>

<dl class="exception">
<dt id="sqlalchemy.exc.NoSuchTableError">
<em class="property">exception </em><tt class="descclassname">sqlalchemy.exc.</tt><tt class="descname">NoSuchTableError</tt><a class="headerlink" href="#sqlalchemy.exc.NoSuchTableError" title="Permalink to this definition">¶</a></dt>
<dd><p>Table does not exist or is not visible to a connection.</p>
</dd></dl>

<dl class="exception">
<dt id="sqlalchemy.exc.NotSupportedError">
<em class="property">exception </em><tt class="descclassname">sqlalchemy.exc.</tt><tt class="descname">NotSupportedError</tt><big>(</big><em>statement</em>, <em>params</em>, <em>orig</em>, <em>connection_invalidated=False</em><big>)</big><a class="headerlink" href="#sqlalchemy.exc.NotSupportedError" title="Permalink to this definition">¶</a></dt>
<dd><p>Wraps a DB-API NotSupportedError.</p>
</dd></dl>

<dl class="exception">
<dt id="sqlalchemy.exc.OperationalError">
<em class="property">exception </em><tt class="descclassname">sqlalchemy.exc.</tt><tt class="descname">OperationalError</tt><big>(</big><em>statement</em>, <em>params</em>, <em>orig</em>, <em>connection_invalidated=False</em><big>)</big><a class="headerlink" href="#sqlalchemy.exc.OperationalError" title="Permalink to this definition">¶</a></dt>
<dd><p>Wraps a DB-API OperationalError.</p>
</dd></dl>

<dl class="exception">
<dt id="sqlalchemy.exc.ProgrammingError">
<em class="property">exception </em><tt class="descclassname">sqlalchemy.exc.</tt><tt class="descname">ProgrammingError</tt><big>(</big><em>statement</em>, <em>params</em>, <em>orig</em>, <em>connection_invalidated=False</em><big>)</big><a class="headerlink" href="#sqlalchemy.exc.ProgrammingError" title="Permalink to this definition">¶</a></dt>
<dd><p>Wraps a DB-API ProgrammingError.</p>
</dd></dl>

<dl class="exception">
<dt id="sqlalchemy.exc.ResourceClosedError">
<em class="property">exception </em><tt class="descclassname">sqlalchemy.exc.</tt><tt class="descname">ResourceClosedError</tt><a class="headerlink" href="#sqlalchemy.exc.ResourceClosedError" title="Permalink to this definition">¶</a></dt>
<dd><p>An operation was requested from a connection, cursor, or other
object that&#8217;s in a closed state.</p>
</dd></dl>

<dl class="exception">
<dt id="sqlalchemy.exc.SADeprecationWarning">
<em class="property">exception </em><tt class="descclassname">sqlalchemy.exc.</tt><tt class="descname">SADeprecationWarning</tt><a class="headerlink" href="#sqlalchemy.exc.SADeprecationWarning" title="Permalink to this definition">¶</a></dt>
<dd><p>Issued once per usage of a deprecated API.</p>
</dd></dl>

<dl class="exception">
<dt id="sqlalchemy.exc.SAPendingDeprecationWarning">
<em class="property">exception </em><tt class="descclassname">sqlalchemy.exc.</tt><tt class="descname">SAPendingDeprecationWarning</tt><a class="headerlink" href="#sqlalchemy.exc.SAPendingDeprecationWarning" title="Permalink to this definition">¶</a></dt>
<dd><p>Issued once per usage of a deprecated API.</p>
</dd></dl>

<dl class="exception">
<dt id="sqlalchemy.exc.SAWarning">
<em class="property">exception </em><tt class="descclassname">sqlalchemy.exc.</tt><tt class="descname">SAWarning</tt><a class="headerlink" href="#sqlalchemy.exc.SAWarning" title="Permalink to this definition">¶</a></dt>
<dd><p>Issued at runtime.</p>
</dd></dl>

<dl class="exception">
<dt id="sqlalchemy.exc.SQLAlchemyError">
<em class="property">exception </em><tt class="descclassname">sqlalchemy.exc.</tt><tt class="descname">SQLAlchemyError</tt><a class="headerlink" href="#sqlalchemy.exc.SQLAlchemyError" title="Permalink to this definition">¶</a></dt>
<dd><p>Generic error class.</p>
</dd></dl>

<dl class="exception">
<dt id="sqlalchemy.exc.StatementError">
<em class="property">exception </em><tt class="descclassname">sqlalchemy.exc.</tt><tt class="descname">StatementError</tt><big>(</big><em>message</em>, <em>statement</em>, <em>params</em>, <em>orig</em><big>)</big><a class="headerlink" href="#sqlalchemy.exc.StatementError" title="Permalink to this definition">¶</a></dt>
<dd><p>An error occurred during execution of a SQL statement.</p>
<p><a class="reference internal" href="#sqlalchemy.exc.StatementError" title="sqlalchemy.exc.StatementError"><tt class="xref py py-class docutils literal"><span class="pre">StatementError</span></tt></a> wraps the exception raised
during execution, and features <a class="reference internal" href="#sqlalchemy.exc.StatementError.statement" title="sqlalchemy.exc.StatementError.statement"><tt class="xref py py-attr docutils literal"><span class="pre">statement</span></tt></a>
and <a class="reference internal" href="#sqlalchemy.exc.StatementError.params" title="sqlalchemy.exc.StatementError.params"><tt class="xref py py-attr docutils literal"><span class="pre">params</span></tt></a> attributes which supply context regarding
the specifics of the statement which had an issue.</p>
<p>The wrapped exception object is available in
the <a class="reference internal" href="#sqlalchemy.exc.StatementError.orig" title="sqlalchemy.exc.StatementError.orig"><tt class="xref py py-attr docutils literal"><span class="pre">orig</span></tt></a> attribute.</p>
<dl class="attribute">
<dt id="sqlalchemy.exc.StatementError.orig">
<tt class="descname">orig</tt><em class="property"> = None</em><a class="headerlink" href="#sqlalchemy.exc.StatementError.orig" title="Permalink to this definition">¶</a></dt>
<dd><p>The DBAPI exception object.</p>
</dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.exc.StatementError.params">
<tt class="descname">params</tt><em class="property"> = None</em><a class="headerlink" href="#sqlalchemy.exc.StatementError.params" title="Permalink to this definition">¶</a></dt>
<dd><p>The parameter list being used when this exception occurred.</p>
</dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.exc.StatementError.statement">
<tt class="descname">statement</tt><em class="property"> = None</em><a class="headerlink" href="#sqlalchemy.exc.StatementError.statement" title="Permalink to this definition">¶</a></dt>
<dd><p>The string SQL statement being invoked when this exception occurred.</p>
</dd></dl>

</dd></dl>

<dl class="exception">
<dt id="sqlalchemy.exc.TimeoutError">
<em class="property">exception </em><tt class="descclassname">sqlalchemy.exc.</tt><tt class="descname">TimeoutError</tt><a class="headerlink" href="#sqlalchemy.exc.TimeoutError" title="Permalink to this definition">¶</a></dt>
<dd><p>Raised when a connection pool times out on getting a connection.</p>
</dd></dl>

<dl class="exception">
<dt id="sqlalchemy.exc.UnboundExecutionError">
<em class="property">exception </em><tt class="descclassname">sqlalchemy.exc.</tt><tt class="descname">UnboundExecutionError</tt><a class="headerlink" href="#sqlalchemy.exc.UnboundExecutionError" title="Permalink to this definition">¶</a></dt>
<dd><p>SQL was attempted without a database connection to execute it on.</p>
</dd></dl>

<dl class="exception">
<dt id="sqlalchemy.exc.UnsupportedCompilationError">
<em class="property">exception </em><tt class="descclassname">sqlalchemy.exc.</tt><tt class="descname">UnsupportedCompilationError</tt><big>(</big><em>compiler</em>, <em>element_type</em><big>)</big><a class="headerlink" href="#sqlalchemy.exc.UnsupportedCompilationError" title="Permalink to this definition">¶</a></dt>
<dd><p>Raised when an operation is not supported by the given compiler.</p>
<div class="versionadded">
<p><span>New in version 0.8.3.</span></p>
</div>
</dd></dl>

</div>

    </div>

</div>

<div id="docs-bottom-navigation" class="docs-navigation-links">
        Previous:
        <a href="interfaces.html" title="previous chapter">Deprecated Event Interfaces</a>
        Next:
        <a href="internals.html" title="next chapter">Core Internals</a>

    <div id="docs-copyright">
        &copy; <a href="../copyright.html">Copyright</a> 2007-2014, the SQLAlchemy authors and contributors.
        Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.2b1.
    </div>
</div>

</div>

        
    </body>
</html>