Changeset 599 for trunk/packages/sipb-xen-www/code
- Timestamp:
- Jun 13, 2008, 2:58:13 AM (16 years ago)
- Location:
- trunk/packages/sipb-xen-www/code
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/sipb-xen-www/code/main.py
r598 r599 18 18 errio = sys.stderr 19 19 if not isinstance(errio, StringIO): 20 return None20 return '' 21 21 sys.stderr = sys.stdout 22 22 errio.seek(0) … … 121 121 def error(op, username, fields, err, emsg): 122 122 """Print an error page when a CodeError occurs""" 123 send_error_mail('xvm error on %s for %s: %s' % (op, username, err), 124 'error on %s for %s: %s\n\n%s\n' 125 % (op, username, err, emsg)) 123 126 d = dict(op=op, user=username, errorMessage=str(err), 124 127 stderr=emsg) … … 582 585 def throwError(_, __, ___): 583 586 """Throw an error, to test the error-tracing mechanisms.""" 584 raise RuntimeError("This is a test of the emergency broadcast system.")587 raise CodeError("test of the emergency broadcast system") 585 588 586 589 mapping = dict(list=listVms, -
trunk/packages/sipb-xen-www/code/templates/error.tmpl
r543 r599 7 7 8 8 #def body 9 <p>$errorMessage in operation $op. This shouldn't happen! Please 10 email xvm@mit.edu to explain how it happened. Stderr:</p> 11 <pre>$stderr</pre> 9 <p>Uh-oh! We experienced an error. Sorry about that. We've gotten 10 mail about it.</p> 11 12 <p>Feel free to poke us at <tt>xvm@mit.edu</tt> if this bug is 13 consistently biting you and we don't seem to be fixing it.</p> 14 15 <p>In case you're curious, the gory details are here.</p> 16 17 <pre> 18 Error on operation $op for user $user: $errorMessage 19 Error output (if any): 20 $stderr 21 </pre> 12 22 #end def
Note: See TracChangeset
for help on using the changeset viewer.