• Home
  • Raw
  • Download

Lines Matching refs:tstate

36 _PyErr_FormatV(PyThreadState *tstate, PyObject *exception,
41 _PyErr_Restore(PyThreadState *tstate, PyObject *type, PyObject *value, in _PyErr_Restore() argument
55 oldtype = tstate->curexc_type; in _PyErr_Restore()
56 oldvalue = tstate->curexc_value; in _PyErr_Restore()
57 oldtraceback = tstate->curexc_traceback; in _PyErr_Restore()
59 tstate->curexc_type = type; in _PyErr_Restore()
60 tstate->curexc_value = value; in _PyErr_Restore()
61 tstate->curexc_traceback = traceback; in _PyErr_Restore()
71 PyThreadState *tstate = _PyThreadState_GET(); in PyErr_Restore() local
72 _PyErr_Restore(tstate, type, value, traceback); in PyErr_Restore()
77 _PyErr_GetTopmostException(PyThreadState *tstate) in _PyErr_GetTopmostException() argument
79 _PyErr_StackItem *exc_info = tstate->exc_info; in _PyErr_GetTopmostException()
115 _PyErr_SetObject(PyThreadState *tstate, PyObject *exception, PyObject *value) in _PyErr_SetObject() argument
122 _PyErr_Format(tstate, PyExc_SystemError, in _PyErr_SetObject()
130 exc_value = _PyErr_GetTopmostException(tstate)->exc_value; in _PyErr_SetObject()
140 _PyErr_Clear(tstate); in _PyErr_SetObject()
189 _PyErr_Restore(tstate, exception, value, tb); in _PyErr_SetObject()
195 PyThreadState *tstate = _PyThreadState_GET(); in PyErr_SetObject() local
196 _PyErr_SetObject(tstate, exception, value); in PyErr_SetObject()
205 PyThreadState *tstate = _PyThreadState_GET(); in _PyErr_SetKeyError() local
211 _PyErr_SetObject(tstate, PyExc_KeyError, tup); in _PyErr_SetKeyError()
216 _PyErr_SetNone(PyThreadState *tstate, PyObject *exception) in _PyErr_SetNone() argument
218 _PyErr_SetObject(tstate, exception, (PyObject *)NULL); in _PyErr_SetNone()
225 PyThreadState *tstate = _PyThreadState_GET(); in PyErr_SetNone() local
226 _PyErr_SetNone(tstate, exception); in PyErr_SetNone()
231 _PyErr_SetString(PyThreadState *tstate, PyObject *exception, in _PyErr_SetString() argument
235 _PyErr_SetObject(tstate, exception, value); in _PyErr_SetString()
242 PyThreadState *tstate = _PyThreadState_GET(); in PyErr_SetString() local
243 _PyErr_SetString(tstate, exception, string); in PyErr_SetString()
253 PyThreadState *tstate = _PyThreadState_GET(); in PyErr_Occurred() local
254 return _PyErr_Occurred(tstate); in PyErr_Occurred()
291 _PyErr_ExceptionMatches(PyThreadState *tstate, PyObject *exc) in _PyErr_ExceptionMatches() argument
293 return PyErr_GivenExceptionMatches(_PyErr_Occurred(tstate), exc); in _PyErr_ExceptionMatches()
300 PyThreadState *tstate = _PyThreadState_GET(); in PyErr_ExceptionMatches() local
301 return _PyErr_ExceptionMatches(tstate, exc); in PyErr_ExceptionMatches()
316 _PyErr_NormalizeException(PyThreadState *tstate, PyObject **exc, in _PyErr_NormalizeException() argument
320 tstate->recursion_headroom++; in _PyErr_NormalizeException()
327 tstate->recursion_headroom--; in _PyErr_NormalizeException()
379 tstate->recursion_headroom--; in _PyErr_NormalizeException()
387 _PyErr_SetString(tstate, PyExc_RecursionError, in _PyErr_NormalizeException()
396 _PyErr_Fetch(tstate, exc, val, tb); in _PyErr_NormalizeException()
425 PyThreadState *tstate = _PyThreadState_GET(); in PyErr_NormalizeException() local
426 _PyErr_NormalizeException(tstate, exc, val, tb); in PyErr_NormalizeException()
431 _PyErr_Fetch(PyThreadState *tstate, PyObject **p_type, PyObject **p_value, in _PyErr_Fetch() argument
434 *p_type = tstate->curexc_type; in _PyErr_Fetch()
435 *p_value = tstate->curexc_value; in _PyErr_Fetch()
436 *p_traceback = tstate->curexc_traceback; in _PyErr_Fetch()
438 tstate->curexc_type = NULL; in _PyErr_Fetch()
439 tstate->curexc_value = NULL; in _PyErr_Fetch()
440 tstate->curexc_traceback = NULL; in _PyErr_Fetch()
447 PyThreadState *tstate = _PyThreadState_GET(); in PyErr_Fetch() local
448 _PyErr_Fetch(tstate, p_type, p_value, p_traceback); in PyErr_Fetch()
453 _PyErr_Clear(PyThreadState *tstate) in _PyErr_Clear() argument
455 _PyErr_Restore(tstate, NULL, NULL, NULL); in _PyErr_Clear()
462 PyThreadState *tstate = _PyThreadState_GET(); in PyErr_Clear() local
463 _PyErr_Clear(tstate); in PyErr_Clear()
468 _PyErr_GetExcInfo(PyThreadState *tstate, in _PyErr_GetExcInfo() argument
471 _PyErr_StackItem *exc_info = _PyErr_GetTopmostException(tstate); in _PyErr_GetExcInfo()
485 PyThreadState *tstate = _PyThreadState_GET(); in PyErr_GetExcInfo() local
486 _PyErr_GetExcInfo(tstate, p_type, p_value, p_traceback); in PyErr_GetExcInfo()
493 PyThreadState *tstate = _PyThreadState_GET(); in PyErr_SetExcInfo() local
495 oldtype = tstate->exc_info->exc_type; in PyErr_SetExcInfo()
496 oldvalue = tstate->exc_info->exc_value; in PyErr_SetExcInfo()
497 oldtraceback = tstate->exc_info->exc_traceback; in PyErr_SetExcInfo()
499 tstate->exc_info->exc_type = p_type; in PyErr_SetExcInfo()
500 tstate->exc_info->exc_value = p_value; in PyErr_SetExcInfo()
501 tstate->exc_info->exc_traceback = p_traceback; in PyErr_SetExcInfo()
519 PyThreadState *tstate = _PyThreadState_GET(); in _PyErr_ChainExceptions() local
522 _PyErr_Format(tstate, PyExc_SystemError, in _PyErr_ChainExceptions()
529 if (_PyErr_Occurred(tstate)) { in _PyErr_ChainExceptions()
531 _PyErr_Fetch(tstate, &exc2, &val2, &tb2); in _PyErr_ChainExceptions()
532 _PyErr_NormalizeException(tstate, &exc, &val, &tb); in _PyErr_ChainExceptions()
538 _PyErr_NormalizeException(tstate, &exc2, &val2, &tb2); in _PyErr_ChainExceptions()
540 _PyErr_Restore(tstate, exc2, val2, tb2); in _PyErr_ChainExceptions()
543 _PyErr_Restore(tstate, exc, val, tb); in _PyErr_ChainExceptions()
558 PyThreadState *tstate = _PyThreadState_GET(); in _PyErr_ChainStackItem() local
559 assert(_PyErr_Occurred(tstate)); in _PyErr_ChainStackItem()
564 exc_info = tstate->exc_info; in _PyErr_ChainStackItem()
576 saved_exc_info = tstate->exc_info; in _PyErr_ChainStackItem()
577 tstate->exc_info = exc_info; in _PyErr_ChainStackItem()
581 _PyErr_Fetch(tstate, &exc, &val, &tb); in _PyErr_ChainStackItem()
587 _PyErr_NormalizeException(tstate, &exc2, &val2, &tb2); in _PyErr_ChainStackItem()
593 _PyErr_SetObject(tstate, exc, val); in _PyErr_ChainStackItem()
599 tstate->exc_info = saved_exc_info; in _PyErr_ChainStackItem()
604 _PyErr_FormatVFromCause(PyThreadState *tstate, PyObject *exception, in _PyErr_FormatVFromCause() argument
609 assert(_PyErr_Occurred(tstate)); in _PyErr_FormatVFromCause()
610 _PyErr_Fetch(tstate, &exc, &val, &tb); in _PyErr_FormatVFromCause()
611 _PyErr_NormalizeException(tstate, &exc, &val, &tb); in _PyErr_FormatVFromCause()
617 assert(!_PyErr_Occurred(tstate)); in _PyErr_FormatVFromCause()
619 _PyErr_FormatV(tstate, exception, format, vargs); in _PyErr_FormatVFromCause()
621 _PyErr_Fetch(tstate, &exc, &val2, &tb); in _PyErr_FormatVFromCause()
622 _PyErr_NormalizeException(tstate, &exc, &val2, &tb); in _PyErr_FormatVFromCause()
626 _PyErr_Restore(tstate, exc, val2, tb); in _PyErr_FormatVFromCause()
632 _PyErr_FormatFromCauseTstate(PyThreadState *tstate, PyObject *exception, in _PyErr_FormatFromCauseTstate() argument
641 _PyErr_FormatVFromCause(tstate, exception, format, vargs); in _PyErr_FormatFromCauseTstate()
649 PyThreadState *tstate = _PyThreadState_GET(); in _PyErr_FormatFromCause() local
656 _PyErr_FormatVFromCause(tstate, exception, format, vargs); in _PyErr_FormatFromCause()
666 PyThreadState *tstate = _PyThreadState_GET(); in PyErr_BadArgument() local
667 _PyErr_SetString(tstate, PyExc_TypeError, in PyErr_BadArgument()
673 _PyErr_NoMemory(PyThreadState *tstate) in _PyErr_NoMemory() argument
681 _PyErr_SetNone(tstate, PyExc_MemoryError); in _PyErr_NoMemory()
688 PyThreadState *tstate = _PyThreadState_GET(); in PyErr_NoMemory() local
689 return _PyErr_NoMemory(tstate); in PyErr_NoMemory()
701 PyThreadState *tstate = _PyThreadState_GET(); in PyErr_SetFromErrnoWithFilenameObjects() local
787 _PyErr_SetObject(tstate, (PyObject *) Py_TYPE(v), v); in PyErr_SetFromErrnoWithFilenameObjects()
840 PyThreadState *tstate = _PyThreadState_GET(); in PyErr_SetExcFromWindowsErrWithFilenameObjects() local
895 _PyErr_SetObject(tstate, (PyObject *) Py_TYPE(v), v); in PyErr_SetExcFromWindowsErrWithFilenameObjects()
971 PyThreadState *tstate = _PyThreadState_GET(); in PyErr_SetImportErrorSubclass() local
980 _PyErr_SetString(tstate, PyExc_TypeError, in PyErr_SetImportErrorSubclass()
986 _PyErr_SetString(tstate, PyExc_TypeError, in PyErr_SetImportErrorSubclass()
1011 _PyErr_SetObject(tstate, (PyObject *)Py_TYPE(error), error); in PyErr_SetImportErrorSubclass()
1029 PyThreadState *tstate = _PyThreadState_GET(); in _PyErr_BadInternalCall() local
1030 _PyErr_Format(tstate, PyExc_SystemError, in _PyErr_BadInternalCall()
1042 PyThreadState *tstate = _PyThreadState_GET(); in PyErr_BadInternalCall() local
1043 _PyErr_SetString(tstate, PyExc_SystemError, in PyErr_BadInternalCall()
1050 _PyErr_FormatV(PyThreadState *tstate, PyObject *exception, in _PyErr_FormatV() argument
1057 _PyErr_Clear(tstate); in _PyErr_FormatV()
1061 _PyErr_SetObject(tstate, exception, string); in _PyErr_FormatV()
1070 PyThreadState *tstate = _PyThreadState_GET(); in PyErr_FormatV() local
1071 return _PyErr_FormatV(tstate, exception, format, vargs); in PyErr_FormatV()
1076 _PyErr_Format(PyThreadState *tstate, PyObject *exception, in _PyErr_Format() argument
1085 _PyErr_FormatV(tstate, exception, format, vargs); in _PyErr_Format()
1094 PyThreadState *tstate = _PyThreadState_GET(); in PyErr_Format() local
1101 _PyErr_FormatV(tstate, exception, format, vargs); in PyErr_Format()
1110 PyThreadState *tstate = _PyThreadState_GET(); in PyErr_NewException() local
1118 _PyErr_SetString(tstate, PyExc_SystemError, in PyErr_NewException()
1235 make_unraisable_hook_args(PyThreadState *tstate, PyObject *exc_type, in make_unraisable_hook_args() argument
1262 if (_PyErr_Occurred(tstate)) { in make_unraisable_hook_args()
1277 write_unraisable_exc_file(PyThreadState *tstate, PyObject *exc_type, in write_unraisable_exc_file() argument
1297 _PyErr_Clear(tstate); in write_unraisable_exc_file()
1318 _PyErr_Clear(tstate); in write_unraisable_exc_file()
1331 _PyErr_Clear(tstate); in write_unraisable_exc_file()
1355 _PyErr_Clear(tstate); in write_unraisable_exc_file()
1373 _PyErr_Clear(tstate); in write_unraisable_exc_file()
1396 write_unraisable_exc(PyThreadState *tstate, PyObject *exc_type, in write_unraisable_exc() argument
1408 int res = write_unraisable_exc_file(tstate, exc_type, exc_value, exc_tb, in write_unraisable_exc()
1419 PyThreadState *tstate = _PyThreadState_GET(); in _PyErr_WriteUnraisableDefaultHook() local
1422 _PyErr_SetString(tstate, PyExc_TypeError, in _PyErr_WriteUnraisableDefaultHook()
1435 if (write_unraisable_exc(tstate, exc_type, exc_value, exc_tb, err_msg, obj) < 0) { in _PyErr_WriteUnraisableDefaultHook()
1456 PyThreadState *tstate = _PyThreadState_GET(); in _PyErr_WriteUnraisableMsg() local
1457 _Py_EnsureTstateNotNULL(tstate); in _PyErr_WriteUnraisableMsg()
1461 _PyErr_Fetch(tstate, &exc_type, &exc_value, &exc_tb); in _PyErr_WriteUnraisableMsg()
1471 PyFrameObject *frame = tstate->frame; in _PyErr_WriteUnraisableMsg()
1475 _PyErr_Clear(tstate); in _PyErr_WriteUnraisableMsg()
1480 _PyErr_NormalizeException(tstate, &exc_type, &exc_value, &exc_tb); in _PyErr_WriteUnraisableMsg()
1484 _PyErr_Clear(tstate); in _PyErr_WriteUnraisableMsg()
1496 tstate, exc_type, exc_value, exc_tb, err_msg, obj); in _PyErr_WriteUnraisableMsg()
1510 if (_PySys_Audit(tstate, "sys.unraisablehook", "OO", hook, hook_args) < 0) { in _PyErr_WriteUnraisableMsg()
1540 _PyErr_Fetch(tstate, &exc_type, &exc_value, &exc_tb); in _PyErr_WriteUnraisableMsg()
1544 (void)write_unraisable_exc(tstate, exc_type, exc_value, exc_tb, in _PyErr_WriteUnraisableMsg()
1552 _PyErr_Clear(tstate); /* Just in case */ in _PyErr_WriteUnraisableMsg()
1587 PyThreadState *tstate = _PyThreadState_GET(); in PyErr_SyntaxLocationObjectEx() local
1590 _PyErr_Fetch(tstate, &exc, &v, &tb); in PyErr_SyntaxLocationObjectEx()
1591 _PyErr_NormalizeException(tstate, &exc, &v, &tb); in PyErr_SyntaxLocationObjectEx()
1596 _PyErr_Clear(tstate); in PyErr_SyntaxLocationObjectEx()
1599 _PyErr_Clear(tstate); in PyErr_SyntaxLocationObjectEx()
1607 _PyErr_Clear(tstate); in PyErr_SyntaxLocationObjectEx()
1611 _PyErr_Clear(tstate); in PyErr_SyntaxLocationObjectEx()
1619 _PyErr_Clear(tstate); in PyErr_SyntaxLocationObjectEx()
1623 _PyErr_Clear(tstate); in PyErr_SyntaxLocationObjectEx()
1631 _PyErr_Clear(tstate); in PyErr_SyntaxLocationObjectEx()
1635 _PyErr_Clear(tstate); in PyErr_SyntaxLocationObjectEx()
1642 _PyErr_Clear(tstate); in PyErr_SyntaxLocationObjectEx()
1648 _PyErr_Clear(tstate); in PyErr_SyntaxLocationObjectEx()
1653 _PyErr_Clear(tstate); in PyErr_SyntaxLocationObjectEx()
1658 _PyErr_Clear(tstate); in PyErr_SyntaxLocationObjectEx()
1667 _PyErr_Clear(tstate); in PyErr_SyntaxLocationObjectEx()
1672 _PyErr_Clear(tstate); in PyErr_SyntaxLocationObjectEx()
1676 _PyErr_Clear(tstate); in PyErr_SyntaxLocationObjectEx()
1684 _PyErr_Clear(tstate); in PyErr_SyntaxLocationObjectEx()
1688 _PyErr_Restore(tstate, exc, v, tb); in PyErr_SyntaxLocationObjectEx()
1705 PyThreadState *tstate = _PyThreadState_GET(); in PyErr_SyntaxLocationEx() local
1710 _PyErr_Clear(tstate); in PyErr_SyntaxLocationEx()
1727 err_programtext(PyThreadState *tstate, FILE *fp, int lineno, const char* encoding) in err_programtext() argument
1761 _PyErr_Clear(tstate); in err_programtext()
1791 PyThreadState *tstate = _PyThreadState_GET(); in _PyErr_ProgramDecodedTextObject() local
1794 _PyErr_Clear(tstate); in _PyErr_ProgramDecodedTextObject()
1797 return err_programtext(tstate, fp, lineno, encoding); in _PyErr_ProgramDecodedTextObject()