source: TI03-DataExtractor/branches/old_stuff/dx/doc/errorHandler_module.txt @ 793

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI03-DataExtractor/branches/old_stuff/dx/doc/errorHandler_module.txt@793
Revision 793, 1.6 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 
1Help on module errorHandler:
2
3NAME
4    errorHandler
5
6FILE
7    /usr/local/dx-0.1.1/errorHandler.py
8
9DESCRIPTION
10    errorHandler.py
11    ===============
12   
13    Module to hold a suitable classes for displaying errors and mailing
14    the administrator when these occur.
15
16CLASSES
17    ErrorHandler
18    MailAdministrator
19   
20    class ErrorHandler
21     |  ErrorHandler class - used to handle errors sensibly by reporting on-screen
22     |  to the user and sending a message to the administrator.
23     | 
24     |  Methods defined here:
25     | 
26     |  __init__(self, msg, noheader=0, request_id=None, user=None)
27     |      Method to build the instance variables required in the class and
28     |      calls the appropriate internal methods. Used to handle errors by calling displayError and
29     |      MailAdministrator class.
30     | 
31     |  displayError(self, msg, noheader=0)
32     |      displayError method - used to display a clean error to the user via
33     |      the main dx web interface page. The noheader argument tells the function
34     |      whether or not to display the full header before the error message.
35   
36    class MailAdministrator
37     |  MailAdministrator class - used to e-mail information to the administrator.
38     | 
39     |  Methods defined here:
40     | 
41     |  __init__(self, subject, adminEmail='badc@rl.ac.uk')
42     |      __init__ method - takes a subject and administrator's e-mail address and
43     |      constructs instance variables to be used in the mailing.
44     | 
45     |  sendMail(self, msg)
46     |      sendMail method - actually send out the e-mail to the administrator
47     |      with the message given in the msg argument.
48
Note: See TracBrowser for help on using the repository browser.