Changeset 601 for trunk


Ignore:
Timestamp:
Jun 13, 2008, 3:51:37 AM (17 years ago)
Author:
price
Message:

all details in email too, still just for CodeError?

Location:
trunk/packages/sipb-xen-www/code
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/sipb-xen-www/code/main.py

    r600 r601  
    120120def error(op, username, fields, err, emsg, traceback):
    121121    """Print an error page when a CodeError occurs"""
    122     send_error_mail('xvm error on %s for %s: %s' % (op, username, err),
    123                     'error on %s for %s: %s\n\n%s\n'
    124                     % (op, username, err, emsg))
    125122    d = dict(op=op, user=username, fields=fields,
    126123             errorMessage=str(err), stderr=emsg, traceback=traceback)
     124    details = templates.error_raw(searchList=[d])
     125    send_error_mail('xvm error on %s for %s: %s' % (op, username, err),
     126                    details)
     127    d['details'] = details
    127128    return templates.error(searchList=[d])
    128129
  • trunk/packages/sipb-xen-www/code/templates/__init__.py

    r510 r601  
    1 __all__ = 'info command error help invalid list unauth vnc'.split()
     1__all__ = 'info command error error_raw help invalid list unauth vnc'.split()
    22for _name in __all__:
    33    try:
  • trunk/packages/sipb-xen-www/code/templates/error.tmpl

    r600 r601  
    1313consistently biting you and we don't seem to be fixing it.</p>
    1414
    15 <p>In case you're curious, the gory details are here.</p>
     15<p>In case you're curious, the gory details are below.</p>
    1616
    1717<pre>
    18 Error on operation $op for user $user: $errorMessage
    19 
    20 Fields:
    21 #for $f in $fields:
    22 $f=$fields[$f].value
    23 #end for
    24 
    25 Error output:
    26 $stderr#slurp
    27 ---- end error output
    28 
    29 Traceback:
    30 $traceback
     18$details
    3119</pre>
    3220#end def
Note: See TracChangeset for help on using the changeset viewer.