File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed
Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -479,10 +479,10 @@ _PyObject_GetXIDataWithFallback(PyThreadState *tstate,
479479 return -1 ;
480480 default :
481481#ifdef Py_DEBUG
482- Py_UNREACHABLE ( );
482+ Py_FatalError ( "unsupported xidata fallback option" );
483483#endif
484484 _PyErr_SetString (tstate , PyExc_SystemError ,
485- "unknown xidata fallback" );
485+ "unsuppocted xidata fallback option " );
486486 return -1 ;
487487 }
488488}
@@ -1665,14 +1665,9 @@ _PyXI_ApplyErrorCode(_PyXI_errcode code, PyInterpreterState *interp)
16651665 PyThreadState * tstate = _PyThreadState_GET ();
16661666
16671667 assert (!PyErr_Occurred ());
1668+ assert (code != _PyXI_ERR_NO_ERROR );
1669+ assert (code != _PyXI_ERR_UNCAUGHT_EXCEPTION );
16681670 switch (code ) {
1669- case _PyXI_ERR_NO_ERROR : _Py_FALLTHROUGH ;
1670- case _PyXI_ERR_UNCAUGHT_EXCEPTION :
1671- // There is nothing to apply.
1672- #ifdef Py_DEBUG
1673- Py_UNREACHABLE ();
1674- #endif
1675- return 0 ;
16761671 case _PyXI_ERR_OTHER :
16771672 // XXX msg?
16781673 PyErr_SetNone (PyExc_InterpreterError );
@@ -1697,7 +1692,7 @@ _PyXI_ApplyErrorCode(_PyXI_errcode code, PyInterpreterState *interp)
16971692 break ;
16981693 default :
16991694#ifdef Py_DEBUG
1700- Py_UNREACHABLE ( );
1695+ Py_FatalError ( "unsupported error code" );
17011696#else
17021697 PyErr_Format (PyExc_RuntimeError , "unsupported error code %d" , code );
17031698#endif
You can’t perform that action at this time.
0 commit comments