• Home
  • Raw
  • Download

Lines Matching refs:tstate

35 _PyErr_FormatV(PyThreadState *tstate, PyObject *exception,
40 _PyErr_Restore(PyThreadState *tstate, PyObject *type, PyObject *value, in _PyErr_Restore() argument
54 oldtype = tstate->curexc_type; in _PyErr_Restore()
55 oldvalue = tstate->curexc_value; in _PyErr_Restore()
56 oldtraceback = tstate->curexc_traceback; in _PyErr_Restore()
58 tstate->curexc_type = type; in _PyErr_Restore()
59 tstate->curexc_value = value; in _PyErr_Restore()
60 tstate->curexc_traceback = traceback; in _PyErr_Restore()
70 PyThreadState *tstate = _PyThreadState_GET(); in PyErr_Restore() local
71 _PyErr_Restore(tstate, type, value, traceback); in PyErr_Restore()
76 _PyErr_GetTopmostException(PyThreadState *tstate) in _PyErr_GetTopmostException() argument
78 _PyErr_StackItem *exc_info = tstate->exc_info; in _PyErr_GetTopmostException()
102 _PyErr_SetObject(PyThreadState *tstate, PyObject *exception, PyObject *value) in _PyErr_SetObject() argument
109 _PyErr_Format(tstate, PyExc_SystemError, in _PyErr_SetObject()
117 exc_value = _PyErr_GetTopmostException(tstate)->exc_value; in _PyErr_SetObject()
127 _PyErr_Clear(tstate); in _PyErr_SetObject()
162 _PyErr_Restore(tstate, exception, value, tb); in _PyErr_SetObject()
168 PyThreadState *tstate = _PyThreadState_GET(); in PyErr_SetObject() local
169 _PyErr_SetObject(tstate, exception, value); in PyErr_SetObject()
178 PyThreadState *tstate = _PyThreadState_GET(); in _PyErr_SetKeyError() local
184 _PyErr_SetObject(tstate, PyExc_KeyError, tup); in _PyErr_SetKeyError()
189 _PyErr_SetNone(PyThreadState *tstate, PyObject *exception) in _PyErr_SetNone() argument
191 _PyErr_SetObject(tstate, exception, (PyObject *)NULL); in _PyErr_SetNone()
198 PyThreadState *tstate = _PyThreadState_GET(); in PyErr_SetNone() local
199 _PyErr_SetNone(tstate, exception); in PyErr_SetNone()
204 _PyErr_SetString(PyThreadState *tstate, PyObject *exception, in _PyErr_SetString() argument
208 _PyErr_SetObject(tstate, exception, value); in _PyErr_SetString()
215 PyThreadState *tstate = _PyThreadState_GET(); in PyErr_SetString() local
216 _PyErr_SetString(tstate, exception, string); in PyErr_SetString()
226 PyThreadState *tstate = _PyThreadState_GET(); in PyErr_Occurred() local
227 return _PyErr_Occurred(tstate); in PyErr_Occurred()
264 _PyErr_ExceptionMatches(PyThreadState *tstate, PyObject *exc) in _PyErr_ExceptionMatches() argument
266 return PyErr_GivenExceptionMatches(_PyErr_Occurred(tstate), exc); in _PyErr_ExceptionMatches()
273 PyThreadState *tstate = _PyThreadState_GET(); in PyErr_ExceptionMatches() local
274 return _PyErr_ExceptionMatches(tstate, exc); in PyErr_ExceptionMatches()
289 _PyErr_NormalizeException(PyThreadState *tstate, PyObject **exc, in _PyErr_NormalizeException() argument
357 _PyErr_SetString(tstate, PyExc_RecursionError, in _PyErr_NormalizeException()
366 _PyErr_Fetch(tstate, exc, val, tb); in _PyErr_NormalizeException()
395 PyThreadState *tstate = _PyThreadState_GET(); in PyErr_NormalizeException() local
396 _PyErr_NormalizeException(tstate, exc, val, tb); in PyErr_NormalizeException()
401 _PyErr_Fetch(PyThreadState *tstate, PyObject **p_type, PyObject **p_value, in _PyErr_Fetch() argument
404 *p_type = tstate->curexc_type; in _PyErr_Fetch()
405 *p_value = tstate->curexc_value; in _PyErr_Fetch()
406 *p_traceback = tstate->curexc_traceback; in _PyErr_Fetch()
408 tstate->curexc_type = NULL; in _PyErr_Fetch()
409 tstate->curexc_value = NULL; in _PyErr_Fetch()
410 tstate->curexc_traceback = NULL; in _PyErr_Fetch()
417 PyThreadState *tstate = _PyThreadState_GET(); in PyErr_Fetch() local
418 _PyErr_Fetch(tstate, p_type, p_value, p_traceback); in PyErr_Fetch()
423 _PyErr_Clear(PyThreadState *tstate) in _PyErr_Clear() argument
425 _PyErr_Restore(tstate, NULL, NULL, NULL); in _PyErr_Clear()
432 PyThreadState *tstate = _PyThreadState_GET(); in PyErr_Clear() local
433 _PyErr_Clear(tstate); in PyErr_Clear()
438 _PyErr_GetExcInfo(PyThreadState *tstate, in _PyErr_GetExcInfo() argument
441 _PyErr_StackItem *exc_info = _PyErr_GetTopmostException(tstate); in _PyErr_GetExcInfo()
455 PyThreadState *tstate = _PyThreadState_GET(); in PyErr_GetExcInfo() local
456 _PyErr_GetExcInfo(tstate, p_type, p_value, p_traceback); in PyErr_GetExcInfo()
463 PyThreadState *tstate = _PyThreadState_GET(); in PyErr_SetExcInfo() local
465 oldtype = tstate->exc_info->exc_type; in PyErr_SetExcInfo()
466 oldvalue = tstate->exc_info->exc_value; in PyErr_SetExcInfo()
467 oldtraceback = tstate->exc_info->exc_traceback; in PyErr_SetExcInfo()
469 tstate->exc_info->exc_type = p_type; in PyErr_SetExcInfo()
470 tstate->exc_info->exc_value = p_value; in PyErr_SetExcInfo()
471 tstate->exc_info->exc_traceback = p_traceback; in PyErr_SetExcInfo()
489 PyThreadState *tstate = _PyThreadState_GET(); in _PyErr_ChainExceptions() local
492 _PyErr_Format(tstate, PyExc_SystemError, in _PyErr_ChainExceptions()
499 if (_PyErr_Occurred(tstate)) { in _PyErr_ChainExceptions()
501 _PyErr_Fetch(tstate, &exc2, &val2, &tb2); in _PyErr_ChainExceptions()
502 _PyErr_NormalizeException(tstate, &exc, &val, &tb); in _PyErr_ChainExceptions()
508 _PyErr_NormalizeException(tstate, &exc2, &val2, &tb2); in _PyErr_ChainExceptions()
510 _PyErr_Restore(tstate, exc2, val2, tb2); in _PyErr_ChainExceptions()
513 _PyErr_Restore(tstate, exc, val, tb); in _PyErr_ChainExceptions()
528 PyThreadState *tstate = _PyThreadState_GET(); in _PyErr_ChainStackItem() local
529 assert(_PyErr_Occurred(tstate)); in _PyErr_ChainStackItem()
534 exc_info = tstate->exc_info; in _PyErr_ChainStackItem()
546 saved_exc_info = tstate->exc_info; in _PyErr_ChainStackItem()
547 tstate->exc_info = exc_info; in _PyErr_ChainStackItem()
551 _PyErr_Fetch(tstate, &exc, &val, &tb); in _PyErr_ChainStackItem()
557 _PyErr_NormalizeException(tstate, &exc2, &val2, &tb2); in _PyErr_ChainStackItem()
563 _PyErr_SetObject(tstate, exc, val); in _PyErr_ChainStackItem()
569 tstate->exc_info = saved_exc_info; in _PyErr_ChainStackItem()
574 _PyErr_FormatVFromCause(PyThreadState *tstate, PyObject *exception, in _PyErr_FormatVFromCause() argument
579 assert(_PyErr_Occurred(tstate)); in _PyErr_FormatVFromCause()
580 _PyErr_Fetch(tstate, &exc, &val, &tb); in _PyErr_FormatVFromCause()
581 _PyErr_NormalizeException(tstate, &exc, &val, &tb); in _PyErr_FormatVFromCause()
587 assert(!_PyErr_Occurred(tstate)); in _PyErr_FormatVFromCause()
589 _PyErr_FormatV(tstate, exception, format, vargs); in _PyErr_FormatVFromCause()
591 _PyErr_Fetch(tstate, &exc, &val2, &tb); in _PyErr_FormatVFromCause()
592 _PyErr_NormalizeException(tstate, &exc, &val2, &tb); in _PyErr_FormatVFromCause()
596 _PyErr_Restore(tstate, exc, val2, tb); in _PyErr_FormatVFromCause()
602 _PyErr_FormatFromCauseTstate(PyThreadState *tstate, PyObject *exception, in _PyErr_FormatFromCauseTstate() argument
611 _PyErr_FormatVFromCause(tstate, exception, format, vargs); in _PyErr_FormatFromCauseTstate()
619 PyThreadState *tstate = _PyThreadState_GET(); in _PyErr_FormatFromCause() local
626 _PyErr_FormatVFromCause(tstate, exception, format, vargs); in _PyErr_FormatFromCause()
636 PyThreadState *tstate = _PyThreadState_GET(); in PyErr_BadArgument() local
637 _PyErr_SetString(tstate, PyExc_TypeError, in PyErr_BadArgument()
643 _PyErr_NoMemory(PyThreadState *tstate) in _PyErr_NoMemory() argument
651 _PyErr_SetNone(tstate, PyExc_MemoryError); in _PyErr_NoMemory()
658 PyThreadState *tstate = _PyThreadState_GET(); in PyErr_NoMemory() local
659 return _PyErr_NoMemory(tstate); in PyErr_NoMemory()
671 PyThreadState *tstate = _PyThreadState_GET(); in PyErr_SetFromErrnoWithFilenameObjects() local
757 _PyErr_SetObject(tstate, (PyObject *) Py_TYPE(v), v); in PyErr_SetFromErrnoWithFilenameObjects()
810 PyThreadState *tstate = _PyThreadState_GET(); in PyErr_SetExcFromWindowsErrWithFilenameObjects() local
865 _PyErr_SetObject(tstate, (PyObject *) Py_TYPE(v), v); in PyErr_SetExcFromWindowsErrWithFilenameObjects()
941 PyThreadState *tstate = _PyThreadState_GET(); in PyErr_SetImportErrorSubclass() local
950 _PyErr_SetString(tstate, PyExc_TypeError, in PyErr_SetImportErrorSubclass()
956 _PyErr_SetString(tstate, PyExc_TypeError, in PyErr_SetImportErrorSubclass()
981 _PyErr_SetObject(tstate, (PyObject *)Py_TYPE(error), error); in PyErr_SetImportErrorSubclass()
999 PyThreadState *tstate = _PyThreadState_GET(); in _PyErr_BadInternalCall() local
1000 _PyErr_Format(tstate, PyExc_SystemError, in _PyErr_BadInternalCall()
1012 PyThreadState *tstate = _PyThreadState_GET(); in PyErr_BadInternalCall() local
1013 _PyErr_SetString(tstate, PyExc_SystemError, in PyErr_BadInternalCall()
1020 _PyErr_FormatV(PyThreadState *tstate, PyObject *exception, in _PyErr_FormatV() argument
1027 _PyErr_Clear(tstate); in _PyErr_FormatV()
1031 _PyErr_SetObject(tstate, exception, string); in _PyErr_FormatV()
1040 PyThreadState *tstate = _PyThreadState_GET(); in PyErr_FormatV() local
1041 return _PyErr_FormatV(tstate, exception, format, vargs); in PyErr_FormatV()
1046 _PyErr_Format(PyThreadState *tstate, PyObject *exception, in _PyErr_Format() argument
1055 _PyErr_FormatV(tstate, exception, format, vargs); in _PyErr_Format()
1064 PyThreadState *tstate = _PyThreadState_GET(); in PyErr_Format() local
1071 _PyErr_FormatV(tstate, exception, format, vargs); in PyErr_Format()
1080 PyThreadState *tstate = _PyThreadState_GET(); in PyErr_NewException() local
1089 _PyErr_SetString(tstate, PyExc_SystemError, in PyErr_NewException()
1103 if (_PyErr_Occurred(tstate)) { in PyErr_NewException()
1206 make_unraisable_hook_args(PyThreadState *tstate, PyObject *exc_type, in make_unraisable_hook_args() argument
1233 if (_PyErr_Occurred(tstate)) { in make_unraisable_hook_args()
1248 write_unraisable_exc_file(PyThreadState *tstate, PyObject *exc_type, in write_unraisable_exc_file() argument
1268 _PyErr_Clear(tstate); in write_unraisable_exc_file()
1289 _PyErr_Clear(tstate); in write_unraisable_exc_file()
1309 _PyErr_Clear(tstate); in write_unraisable_exc_file()
1345 _PyErr_Clear(tstate); in write_unraisable_exc_file()
1368 write_unraisable_exc(PyThreadState *tstate, PyObject *exc_type, in write_unraisable_exc() argument
1380 int res = write_unraisable_exc_file(tstate, exc_type, exc_value, exc_tb, in write_unraisable_exc()
1391 PyThreadState *tstate = _PyThreadState_GET(); in _PyErr_WriteUnraisableDefaultHook() local
1394 _PyErr_SetString(tstate, PyExc_TypeError, in _PyErr_WriteUnraisableDefaultHook()
1407 if (write_unraisable_exc(tstate, exc_type, exc_value, exc_tb, err_msg, obj) < 0) { in _PyErr_WriteUnraisableDefaultHook()
1428 PyThreadState *tstate = _PyThreadState_GET(); in _PyErr_WriteUnraisableMsg() local
1429 _Py_EnsureTstateNotNULL(tstate); in _PyErr_WriteUnraisableMsg()
1433 _PyErr_Fetch(tstate, &exc_type, &exc_value, &exc_tb); in _PyErr_WriteUnraisableMsg()
1443 PyFrameObject *frame = tstate->frame; in _PyErr_WriteUnraisableMsg()
1447 _PyErr_Clear(tstate); in _PyErr_WriteUnraisableMsg()
1452 _PyErr_NormalizeException(tstate, &exc_type, &exc_value, &exc_tb); in _PyErr_WriteUnraisableMsg()
1456 _PyErr_Clear(tstate); in _PyErr_WriteUnraisableMsg()
1468 tstate, exc_type, exc_value, exc_tb, err_msg, obj); in _PyErr_WriteUnraisableMsg()
1482 if (_PySys_Audit(tstate, "sys.unraisablehook", "OO", hook, hook_args) < 0) { in _PyErr_WriteUnraisableMsg()
1512 _PyErr_Fetch(tstate, &exc_type, &exc_value, &exc_tb); in _PyErr_WriteUnraisableMsg()
1516 (void)write_unraisable_exc(tstate, exc_type, exc_value, exc_tb, in _PyErr_WriteUnraisableMsg()
1524 _PyErr_Clear(tstate); /* Just in case */ in _PyErr_WriteUnraisableMsg()
1559 PyThreadState *tstate = _PyThreadState_GET(); in PyErr_SyntaxLocationObject() local
1562 _PyErr_Fetch(tstate, &exc, &v, &tb); in PyErr_SyntaxLocationObject()
1563 _PyErr_NormalizeException(tstate, &exc, &v, &tb); in PyErr_SyntaxLocationObject()
1568 _PyErr_Clear(tstate); in PyErr_SyntaxLocationObject()
1571 _PyErr_Clear(tstate); in PyErr_SyntaxLocationObject()
1579 _PyErr_Clear(tstate); in PyErr_SyntaxLocationObject()
1583 _PyErr_Clear(tstate); in PyErr_SyntaxLocationObject()
1588 _PyErr_Clear(tstate); in PyErr_SyntaxLocationObject()
1594 _PyErr_Clear(tstate); in PyErr_SyntaxLocationObject()
1604 _PyErr_Clear(tstate); in PyErr_SyntaxLocationObject()
1609 _PyErr_Clear(tstate); in PyErr_SyntaxLocationObject()
1615 _PyErr_Clear(tstate); in PyErr_SyntaxLocationObject()
1619 _PyErr_Restore(tstate, exc, v, tb); in PyErr_SyntaxLocationObject()
1625 PyThreadState *tstate = _PyThreadState_GET(); in PyErr_SyntaxLocationEx() local
1630 _PyErr_Clear(tstate); in PyErr_SyntaxLocationEx()
1647 err_programtext(PyThreadState *tstate, FILE *fp, int lineno) in err_programtext() argument
1677 _PyErr_Clear(tstate); in err_programtext()
1690 PyThreadState *tstate = _PyThreadState_GET(); in PyErr_ProgramText() local
1692 return err_programtext(tstate, fp, lineno); in PyErr_ProgramText()
1702 PyThreadState *tstate = _PyThreadState_GET(); in PyErr_ProgramTextObject() local
1705 _PyErr_Clear(tstate); in PyErr_ProgramTextObject()
1708 return err_programtext(tstate, fp, lineno); in PyErr_ProgramTextObject()