source: TI03-DataExtractor/branches/old_stuff/dx/doc/errorHandler.html @ 793

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI03-DataExtractor/branches/old_stuff/dx/doc/errorHandler.html@793
Revision 793, 8.7 KB checked in by astephen, 13 years ago (diff)

Put all the old code in the old_stuff branch.

  • Property svn:executable set to *
Line 
1
2<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
3<html><head><title>Python: module errorHandler</title>
4</head><body bgcolor="#f0f0f8">
5
6<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
7<tr bgcolor="#7799ee">
8<td valign=bottom>&nbsp;<br>
9<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>errorHandler</strong></big></big></font></td
10><td align=right valign=bottom
11><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/usr/local/dx-0.1.1/errorHandler.py">/usr/local/dx-0.1.1/errorHandler.py</a></font></td></tr></table>
12    <p><tt>errorHandler.py<br>
13===============<br>
14&nbsp;<br>
15Module&nbsp;to&nbsp;hold&nbsp;a&nbsp;suitable&nbsp;classes&nbsp;for&nbsp;displaying&nbsp;errors&nbsp;and&nbsp;mailing<br>
16the&nbsp;administrator&nbsp;when&nbsp;these&nbsp;occur.</tt></p>
17<p>
18<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
19<tr bgcolor="#aa55cc">
20<td colspan=3 valign=bottom>&nbsp;<br>
21<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
22   
23<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
24<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="os.html">os</a><br>
25</td><td width="25%" valign=top><a href="smtplib.html">smtplib</a><br>
26</td><td width="25%" valign=top><a href="sys.html">sys</a><br>
27</td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
28<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
29<tr bgcolor="#ee77aa">
30<td colspan=3 valign=bottom>&nbsp;<br>
31<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
32   
33<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
34<td width="100%"><dl>
35<dt><font face="helvetica, arial"><a href="errorHandler.html#ErrorHandler">ErrorHandler</a>
36</font></dt><dt><font face="helvetica, arial"><a href="errorHandler.html#MailAdministrator">MailAdministrator</a>
37</font></dt></dl>
38 <p>
39<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
40<tr bgcolor="#ffc8d8">
41<td colspan=3 valign=bottom>&nbsp;<br>
42<font color="#000000" face="helvetica, arial"><a name="ErrorHandler">class <strong>ErrorHandler</strong></a></font></td></tr>
43   
44<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
45<td colspan=2><tt><a href="#ErrorHandler">ErrorHandler</a>&nbsp;class&nbsp;-&nbsp;used&nbsp;to&nbsp;handle&nbsp;errors&nbsp;sensibly&nbsp;by&nbsp;reporting&nbsp;on-screen<br>
46to&nbsp;the&nbsp;user&nbsp;and&nbsp;sending&nbsp;a&nbsp;message&nbsp;to&nbsp;the&nbsp;administrator.<br>&nbsp;</tt></td></tr>
47<tr><td>&nbsp;</td>
48<td width="100%">Methods defined here:<br>
49<dl><dt><a name="ErrorHandler-__init__"><strong>__init__</strong></a>(self, msg, noheader<font color="#909090">=0</font>, request_id<font color="#909090">=None</font>, user<font color="#909090">=None</font>)</dt><dd><tt>Method&nbsp;to&nbsp;build&nbsp;the&nbsp;instance&nbsp;variables&nbsp;required&nbsp;in&nbsp;the&nbsp;class&nbsp;and<br>
50calls&nbsp;the&nbsp;appropriate&nbsp;internal&nbsp;methods.&nbsp;Used&nbsp;to&nbsp;handle&nbsp;errors&nbsp;by&nbsp;calling&nbsp;displayError&nbsp;and<br>
51<a href="#MailAdministrator">MailAdministrator</a>&nbsp;class.</tt></dd></dl>
52
53<dl><dt><a name="ErrorHandler-displayError"><strong>displayError</strong></a>(self, msg, noheader<font color="#909090">=0</font>)</dt><dd><tt>displayError&nbsp;method&nbsp;-&nbsp;used&nbsp;to&nbsp;display&nbsp;a&nbsp;clean&nbsp;error&nbsp;to&nbsp;the&nbsp;user&nbsp;via<br>
54the&nbsp;main&nbsp;dx&nbsp;web&nbsp;interface&nbsp;page.&nbsp;The&nbsp;noheader&nbsp;argument&nbsp;tells&nbsp;the&nbsp;function<br>
55whether&nbsp;or&nbsp;not&nbsp;to&nbsp;display&nbsp;the&nbsp;full&nbsp;header&nbsp;before&nbsp;the&nbsp;error&nbsp;message.</tt></dd></dl>
56
57</td></tr></table> <p>
58<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
59<tr bgcolor="#ffc8d8">
60<td colspan=3 valign=bottom>&nbsp;<br>
61<font color="#000000" face="helvetica, arial"><a name="MailAdministrator">class <strong>MailAdministrator</strong></a></font></td></tr>
62   
63<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
64<td colspan=2><tt><a href="#MailAdministrator">MailAdministrator</a>&nbsp;class&nbsp;-&nbsp;used&nbsp;to&nbsp;e-mail&nbsp;information&nbsp;to&nbsp;the&nbsp;administrator.<br>&nbsp;</tt></td></tr>
65<tr><td>&nbsp;</td>
66<td width="100%">Methods defined here:<br>
67<dl><dt><a name="MailAdministrator-__init__"><strong>__init__</strong></a>(self, subject, adminEmail<font color="#909090">='badc@rl.ac.uk'</font>)</dt><dd><tt>__init__&nbsp;method&nbsp;-&nbsp;takes&nbsp;a&nbsp;subject&nbsp;and&nbsp;administrator's&nbsp;e-mail&nbsp;address&nbsp;and<br>
68constructs&nbsp;instance&nbsp;variables&nbsp;to&nbsp;be&nbsp;used&nbsp;in&nbsp;the&nbsp;mailing.</tt></dd></dl>
69
70<dl><dt><a name="MailAdministrator-sendMail"><strong>sendMail</strong></a>(self, msg)</dt><dd><tt>sendMail&nbsp;method&nbsp;-&nbsp;actually&nbsp;send&nbsp;out&nbsp;the&nbsp;e-mail&nbsp;to&nbsp;the&nbsp;administrator<br>
71with&nbsp;the&nbsp;message&nbsp;given&nbsp;in&nbsp;the&nbsp;msg&nbsp;argument.</tt></dd></dl>
72
73</td></tr></table></td></tr></table><p>
74<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
75<tr bgcolor="#55aa55">
76<td colspan=3 valign=bottom>&nbsp;<br>
77<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
78   
79<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
80<td width="100%"><strong>ADMIN_MAIL_ADDRESS</strong> = 'badc@rl.ac.uk'<br>
81<strong>ADMIN_NOTIFICATION</strong> = 0<br>
82<strong>BASEDIR</strong> = '/usr/local/dx_wv'<br>
83<strong>CDAT_BIN_PATH</strong> = '/usr/local/cdat/bin'<br>
84<strong>CF_METADATA_GLOBAL_ATTRIBUTES</strong> = ['Conventions', 'title', 'source', 'institution', 'history', 'references', 'comment']<br>
85<strong>CGI_NAME</strong> = 'http://localhost/cgi-bin/dxui-0.1.1.py'<br>
86<strong>DATASETS</strong> = {'Test Data Group 1': (('Test Dataset 1', '/usr/local/dx_wv/testdata/testdata1.xml', 'dataset1-unused-code'),), 'Test Data Group 2': (('Test Dataset 2', '/usr/local/dx_wv/testdata/testdata2.xml', 'dataset2-unused-code'),), 'Test Data Group 3': (('Test Dataset 3', '/usr/local/dx_wv/testdata/testdata3.xml', 'dataset3-unused-code'),)}<br>
87<strong>DATASET_GROUPS</strong> = {'Test Data Group 1': None, 'Test Data Group 2': None, 'Test Data Group 3': None}<br>
88<strong>DEBUG</strong> = 1<br>
89<strong>DOMAIN_PARAMS</strong> = ('start_time', 'end_time', 'time_interval', 'horiz_domain', 'resolution', 'vertical_units', 'vertical_domain', 'output_type')<br>
90<strong>EXTRAS_DIR</strong> = '/dx_extra'<br>
91<strong>HORIZ_KEYS</strong> = ('northernExtent', 'easternExtent', 'southernExtent', 'westernExtent')<br>
92<strong>HTML_DIR</strong> = '/usr/local/dx_wv/html'<br>
93<strong>HTTP_HEADER</strong> = 'Content-Type: text/html<font color="#c040c0">\n\n</font>'<br>
94<strong>HTTP_OUTPUT_DIR</strong> = 'http://localhost/output'<br>
95<strong>LEFT_LOGO</strong> = 'dx_logo.jpg'<br>
96<strong>LOCAL_CGI_NAME</strong> = '/srv/www/cgi-bin/dxui-0.1.1.py'<br>
97<strong>LOCAL_MAIL_HOST</strong> = 'outbox.rl.ac.uk'<br>
98<strong>LOCAL_PYTHONPATH</strong> = ['/usr/local/badcdat/lib', '/usr/local/badcdat/lib/python', '/home/tornado/internal/badc/software/pythonlib/badc', '/usr/local/cdat/lib/python2.3', '/usr/local/cdat/lib/python2.3/site-packages', '/usr/local/cdat/lib/python2.3/site-packages/Numeric']<br>
99<strong>LOCAL_RULES</strong> = 0<br>
100<strong>LOGO_DIR</strong> = '/dx_extra/logos'<br>
101<strong>MAP_APPLET</strong> = '/dx_extra/LiveMap_30/extractorMap.html'<br>
102<strong>MESSAGE_TO_USERS</strong> = 'This is a test version of the Data Extractor so ...error occurs so that we can improve this service.'<br>
103<strong>OUTPUT_DIR</strong> = '/srv/www/htdocs/output'<br>
104<strong>OUTPUT_DIR_PERMISSION</strong> = 488<br>
105<strong>OUTPUT_FILE_GROUP</strong> = 'users'<br>
106<strong>OUTPUT_FILE_PERMISSION</strong> = 416<br>
107<strong>OUTPUT_FILE_USER</strong> = 'wwwrun'<br>
108<strong>OUTPUT_FORMATS</strong> = ['NetCDF']<br>
109<strong>PACKAGE_NAME</strong> = 'Data Extractor'<br>
110<strong>REGISTRATION_PAGE</strong> = 'http://badc.nerc.ac.uk/data/list_all_datasets.html?source=home'<br>
111<strong>REQUEST_DIR</strong> = '/usr/local/dx_wv/requests'<br>
112<strong>REQUEST_SIZE_LIMIT</strong> = 100<br>
113<strong>RESTRICTED_DATA</strong> = 0<br>
114<strong>RIGHT_LOGO</strong> = 'dx_logo.jpg'<br>
115<strong>STAGES</strong> = ['DatasetGroupPage', 'DatasetPage', 'VariablesPage', 'DomainPage', 'ResultsPage']<br>
116<strong>TIME_KEYS</strong> = ('year', 'month', 'day', 'hour', 'min', 'sec')<br>
117<strong>TIMING_SCALE_FACTOR</strong> = 0.001<br>
118<strong>USER_HOMEDIR</strong> = '/var/lib/wwwrun'<br>
119<strong>VISUALISOR_NAME</strong> = '/cgi-bin/splatui-0.1.1.py'</td></tr></table>
120</body></html>
Note: See TracBrowser for help on using the repository browser.