PageRenderTime 142ms CodeModel.GetById 61ms app.highlight 1ms RepoModel.GetById 79ms app.codeStats 0ms

/pypy/module/thread/error.py

https://bitbucket.org/dac_io/pypy
Python | 9 lines | 7 code | 2 blank | 0 comment | 0 complexity | aa0ddba06b17e5829027064290a84867 MD5 | raw file
1from pypy.interpreter.error import OperationError
2
3class Cache:
4    def __init__(self, space):
5        self.w_error = space.new_exception_class("thread.error")
6
7def wrap_thread_error(space, msg):
8    w_error = space.fromcache(Cache).w_error
9    return OperationError(w_error, space.wrap(msg))