All Samples(8268) | Call(7727) | Derive(0) | Import(541)
Shorthand for 'print_exception(sys.exc_type, sys.exc_value, sys.exc_traceback, limit, file)'. (In fact, it uses sys.exc_info() to retrieve the same information in a thread-safe way.)
def print_exc(limit=None, file=None):
"""Shorthand for 'print_exception(sys.exc_type, sys.exc_value, sys.exc_traceback, limit, file)'.
(In fact, it uses sys.exc_info() to retrieve the same information
in a thread-safe way.)"""
if file is None:
file = sys.stderr
try:
etype, value, tb = sys.exc_info()
print_exception(etype, value, tb, limit, file)
finally:
etype = value = tb = None
import StringIO ## get the traceback message sfp = StringIO.StringIO() traceback.print_exc(file=sfp) exception = sfp.getvalue() sfp.close()
src/p/y/pyjamas-0.7/examples/djangowanted/wanted/jsonrpc.py Pyjamas(Download)
return response(id, result)
except BaseException:
f = open("/tmp/log.txt", "w")
traceback.print_exc(file=f)
f.close()
etype, eval, etb = sys.exc_info()
return error(id, 100, '%s: %s' %(etype.__name__, eval))
except:
etype, eval, etb = sys.exc_info()
f = open("/tmp/log.txt", "w")
traceback.print_exc(file=f)
src/p/y/pyjamas-desktop-HEAD/pyjamas-webkit/examples/jsonrpc/public/services/jsonrpc/errors.py pyjamas-desktop(Download)
def getTracebackStr():
import traceback
import StringIO
s=StringIO.StringIO("")
traceback.print_exc(file=s)
return s.getvalue()src/p/y/pyjamas-desktop-HEAD/pyjamas-web/examples/jsonrpc/public/services/jsonrpc/errors.py pyjamas-desktop(Download)
def getTracebackStr():
import traceback
import StringIO
s=StringIO.StringIO("")
traceback.print_exc(file=s)
return s.getvalue()src/p/y/pyjamas-desktop-HEAD/pyjamas-khtml/examples/jsonrpc/public/services/jsonrpc/errors.py pyjamas-desktop(Download)
def getTracebackStr():
import traceback
import StringIO
s=StringIO.StringIO("")
traceback.print_exc(file=s)
return s.getvalue()src/w/e/Webware-for-Python-1.0.2/WebKit/Examples/AjaxPage.py Webware for Python(Download)
cmd = str(method(*args))
except Exception:
err = StringIO()
traceback.print_exc(file=err)
e = err.getvalue()
cmd = self.alert('%s was called, '
'but encountered an error: %s' % (call, e))
src/p/y/pyjamas-0.7/examples/jsonrpc/public/services/jsonrpc/errors.py Pyjamas(Download)
def getTracebackStr():
import traceback
import StringIO
s=StringIO.StringIO("")
traceback.print_exc(file=s)
return s.getvalue()src/p/y/pyjamas-0.7/examples/infohierarchy/public/services/jsonrpc/errors.py Pyjamas(Download)
def getTracebackStr():
import traceback
import StringIO
s=StringIO.StringIO("")
traceback.print_exc(file=s)
return s.getvalue()src/d/i/diksel-HEAD/trunk/thirdparty/pyjamasdev/examples/jsonrpc/public/services/jsonrpc/errors.py diksel(Download)
def getTracebackStr():
import traceback
import StringIO
s=StringIO.StringIO("")
traceback.print_exc(file=s)
return s.getvalue()src/d/i/diksel-HEAD/trunk/thirdparty/pyjamasdev/examples/infohierarchy/public/services/jsonrpc/errors.py diksel(Download)
def getTracebackStr():
import traceback
import StringIO
s=StringIO.StringIO("")
traceback.print_exc(file=s)
return s.getvalue()1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 Next