Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
5d2c6835
Kaydet (Commit)
5d2c6835
authored
Mar 22, 2004
tarafından
Armin Rigo
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Lost reference.
üst
1eb4bfc6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
pythonrun.c
Python/pythonrun.c
+8
-6
No files found.
Python/pythonrun.c
Dosyayı görüntüle @
5d2c6835
...
@@ -1086,8 +1086,8 @@ PyErr_PrintEx(int set_sys_last_vars)
...
@@ -1086,8 +1086,8 @@ PyErr_PrintEx(int set_sys_last_vars)
void
PyErr_Display
(
PyObject
*
exception
,
PyObject
*
value
,
PyObject
*
tb
)
void
PyErr_Display
(
PyObject
*
exception
,
PyObject
*
value
,
PyObject
*
tb
)
{
{
int
err
=
0
;
int
err
=
0
;
PyObject
*
v
=
value
;
PyObject
*
f
=
PySys_GetObject
(
"stderr"
);
PyObject
*
f
=
PySys_GetObject
(
"stderr"
);
Py_INCREF
(
value
);
if
(
f
==
NULL
)
if
(
f
==
NULL
)
fprintf
(
stderr
,
"lost sys.stderr
\n
"
);
fprintf
(
stderr
,
"lost sys.stderr
\n
"
);
else
{
else
{
...
@@ -1097,12 +1097,12 @@ void PyErr_Display(PyObject *exception, PyObject *value, PyObject *tb)
...
@@ -1097,12 +1097,12 @@ void PyErr_Display(PyObject *exception, PyObject *value, PyObject *tb)
if
(
tb
&&
tb
!=
Py_None
)
if
(
tb
&&
tb
!=
Py_None
)
err
=
PyTraceBack_Print
(
tb
,
f
);
err
=
PyTraceBack_Print
(
tb
,
f
);
if
(
err
==
0
&&
if
(
err
==
0
&&
PyObject_HasAttrString
(
v
,
"print_file_and_line"
))
PyObject_HasAttrString
(
v
alue
,
"print_file_and_line"
))
{
{
PyObject
*
message
;
PyObject
*
message
;
const
char
*
filename
,
*
text
;
const
char
*
filename
,
*
text
;
int
lineno
,
offset
;
int
lineno
,
offset
;
if
(
!
parse_syntax_error
(
v
,
&
message
,
&
filename
,
if
(
!
parse_syntax_error
(
v
alue
,
&
message
,
&
filename
,
&
lineno
,
&
offset
,
&
text
))
&
lineno
,
&
offset
,
&
text
))
PyErr_Clear
();
PyErr_Clear
();
else
{
else
{
...
@@ -1118,7 +1118,8 @@ void PyErr_Display(PyObject *exception, PyObject *value, PyObject *tb)
...
@@ -1118,7 +1118,8 @@ void PyErr_Display(PyObject *exception, PyObject *value, PyObject *tb)
PyFile_WriteString
(
"
\n
"
,
f
);
PyFile_WriteString
(
"
\n
"
,
f
);
if
(
text
!=
NULL
)
if
(
text
!=
NULL
)
print_error_text
(
f
,
offset
,
text
);
print_error_text
(
f
,
offset
,
text
);
v
=
message
;
Py_DECREF
(
value
);
value
=
message
;
/* Can't be bothered to check all those
/* Can't be bothered to check all those
PyFile_WriteString() calls */
PyFile_WriteString() calls */
if
(
PyErr_Occurred
())
if
(
PyErr_Occurred
())
...
@@ -1155,8 +1156,8 @@ void PyErr_Display(PyObject *exception, PyObject *value, PyObject *tb)
...
@@ -1155,8 +1156,8 @@ void PyErr_Display(PyObject *exception, PyObject *value, PyObject *tb)
else
else
err
=
PyFile_WriteObject
(
exception
,
f
,
Py_PRINT_RAW
);
err
=
PyFile_WriteObject
(
exception
,
f
,
Py_PRINT_RAW
);
if
(
err
==
0
)
{
if
(
err
==
0
)
{
if
(
v
!=
NULL
&&
v
!=
Py_None
)
{
if
(
v
alue
!=
Py_None
)
{
PyObject
*
s
=
PyObject_Str
(
v
);
PyObject
*
s
=
PyObject_Str
(
v
alue
);
/* only print colon if the str() of the
/* only print colon if the str() of the
object is not the empty string
object is not the empty string
*/
*/
...
@@ -1173,6 +1174,7 @@ void PyErr_Display(PyObject *exception, PyObject *value, PyObject *tb)
...
@@ -1173,6 +1174,7 @@ void PyErr_Display(PyObject *exception, PyObject *value, PyObject *tb)
if
(
err
==
0
)
if
(
err
==
0
)
err
=
PyFile_WriteString
(
"
\n
"
,
f
);
err
=
PyFile_WriteString
(
"
\n
"
,
f
);
}
}
Py_DECREF
(
value
);
/* If an error happened here, don't show it.
/* If an error happened here, don't show it.
XXX This is wrong, but too many callers rely on this behavior. */
XXX This is wrong, but too many callers rely on this behavior. */
if
(
err
!=
0
)
if
(
err
!=
0
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment