-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathexception.html
More file actions
77 lines (69 loc) · 2.62 KB
/
exception.html
File metadata and controls
77 lines (69 loc) · 2.62 KB
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
<!DOCTYPE html>
<html>
<head>
<title>exception.py</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="dycco.css">
</head>
<body>
<div id="container">
<div id="background"></div>
<table cellpadding="0" cellspacing="0">
<thead>
<tr>
<th class="docs">
<h1>exception.py</h1>
</th>
<th class="code">
</th>
</tr>
</thead>
<tbody>
<tr id="section-2">
<td class="docs">
<div class="pilwrap">
<a class="pilcrow" href="#section-2">¶</a>
</div>
<p>Exception handling test application.</p>
<p>This application always raises 404 Not Found.</p>
</td>
<td class="code">
<div class="highlight"><pre>
</pre></div>
</td>
</tr>
<tr id="section-7">
<td class="docs">
<div class="pilwrap">
<a class="pilcrow" href="#section-7">¶</a>
</div>
</td>
<td class="code">
<div class="highlight"><pre><span class="kn">from</span> <span class="nn">webob.exc</span> <span class="kn">import</span> <span class="n">HTTPNotFound</span>
</pre></div>
</td>
</tr>
<tr id="section-10">
<td class="docs">
<div class="pilwrap">
<a class="pilcrow" href="#section-10">¶</a>
</div>
</td>
<td class="code">
<div class="highlight"><pre><span class="k">def</span> <span class="nf">exception</span><span class="p">(</span><span class="n">context</span><span class="p">):</span>
<span class="k">raise</span> <span class="n">HTTPNotFound</span><span class="p">()</span>
<span class="k">if</span> <span class="n">__name__</span> <span class="o">==</span> <span class="s">'__main__'</span><span class="p">:</span>
<span class="kn">from</span> <span class="nn">web.core</span> <span class="kn">import</span> <span class="n">Application</span>
<span class="n">Application</span><span class="p">(</span><span class="n">exception</span><span class="p">)</span><span class="o">.</span><span class="n">serve</span><span class="p">(</span><span class="s">'wsgiref'</span><span class="p">)</span>
</pre></div>
</td>
</tr>
</tbody>
</table>
<footer>
Generated by <b><a href="http://mccutchen.github.com/dycco/">Dycco</a></b>.
Last updated <b>25 Apr 2016</b>.
</footer>
</div>
</body>
</html>