Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(8)  |  Call(4)  |  Derive(0)  |  Import(4)
dumps the given exception using pickle (since not all exceptions are picklable)

        def dump_exception(typ, val, tb):
    """dumps the given exception using pickle (since not all exceptions are picklable)"""
    tbtext = "".join(traceback.format_exception(typ, val, tb))
    sys.last_type, sys.last_value, sys.last_traceback = typ, val, tb
    try:
        pickled_exc = pickle.dumps((typ, val, tbtext), protocol = PICKLE_PROTOCOL)
    except pickle.PicklingError, ex:
        newval = NestedException("pickling error %s\nexception type: %r\nexception object: %s" % (ex, typ, val))
        pickled_exc = pickle.dumps((NestedException, newval, tbtext), protocol = PICKLE_PROTOCOL)
    return pickled_exc
        


src/l/a/landline-server-HEAD/co.whatisuplabs.ldln/lib/play/python/Lib/site-packages/Rpyc/Connection.py   landline-server(Download)
import sys
from Boxing import Box, dump_exception, load_exception
from ModuleNetProxy import RootImporter
from Lib import raise_exception, AttrFrontend
 
    def send_exception(self, seq, exc_info):
        self.send(FRAME_EXCEPTION, seq, dump_exception(*exc_info))
 
    def send_result(self, seq, obj):
        self.send(FRAME_RESULT, seq, obj)

src/r/e/restcommander-HEAD/play-1.2.4/python/Lib/site-packages/Rpyc/Connection.py   restcommander(Download)
import sys
from Boxing import Box, dump_exception, load_exception
from ModuleNetProxy import RootImporter
from Lib import raise_exception, AttrFrontend
 
    def send_exception(self, seq, exc_info):
        self.send(FRAME_EXCEPTION, seq, dump_exception(*exc_info))
 
    def send_result(self, seq, obj):
        self.send(FRAME_RESULT, seq, obj)

src/h/e/heroku-playframework-HEAD/play-1.2.2RC1/python/Lib/site-packages/Rpyc/Connection.py   heroku-playframework(Download)
import sys
from Boxing import Box, dump_exception, load_exception
from ModuleNetProxy import RootImporter
from Lib import raise_exception, AttrFrontend
 
    def send_exception(self, seq, exc_info):
        self.send(FRAME_EXCEPTION, seq, dump_exception(*exc_info))
 
    def send_result(self, seq, obj):
        self.send(FRAME_RESULT, seq, obj)

src/j/f/jfinal-app-HEAD/jfgen/python/Lib/site-packages/Rpyc/Connection.py   jfinal-app(Download)
import sys
from Boxing import Box, dump_exception, load_exception
from ModuleNetProxy import RootImporter
from Lib import raise_exception, AttrFrontend
 
    def send_exception(self, seq, exc_info):
        self.send(FRAME_EXCEPTION, seq, dump_exception(*exc_info))
 
    def send_result(self, seq, obj):
        self.send(FRAME_RESULT, seq, obj)