PageRenderTime 44ms CodeModel.GetById 12ms RepoModel.GetById 1ms app.codeStats 0ms

/pypy/module/thread/error.py

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