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
3bb1edb3
Kaydet (Commit)
3bb1edb3
authored
Nis 10, 2000
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Match the error messages to say "(most recent call last)" like the
built-in messages.
üst
d6904ea5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
traceback.py
Lib/traceback.py
+5
-5
No files found.
Lib/traceback.py
Dosyayı görüntüle @
3bb1edb3
...
@@ -97,7 +97,7 @@ def print_exception(etype, value, tb, limit=None, file=None):
...
@@ -97,7 +97,7 @@ def print_exception(etype, value, tb, limit=None, file=None):
"""Print exception information and up to 'limit' stack trace entries
"""Print exception information and up to 'limit' stack trace entries
from the traceback 'tb' to 'file'. This differs from print_tb() in
from the traceback 'tb' to 'file'. This differs from print_tb() in
the following ways: (1) if traceback is not None, it prints a header
the following ways: (1) if traceback is not None, it prints a header
"Traceback (
innermost
last):"; (2) it prints the exception type and
"Traceback (
most recent call
last):"; (2) it prints the exception type and
value after the stack trace; (3) if type is SyntaxError and value has
value after the stack trace; (3) if type is SyntaxError and value has
the appropriate format, it prints the line where the syntax error
the appropriate format, it prints the line where the syntax error
occurred with a caret on the next line indicating the approximate
occurred with a caret on the next line indicating the approximate
...
@@ -105,7 +105,7 @@ def print_exception(etype, value, tb, limit=None, file=None):
...
@@ -105,7 +105,7 @@ def print_exception(etype, value, tb, limit=None, file=None):
if
not
file
:
if
not
file
:
file
=
sys
.
stderr
file
=
sys
.
stderr
if
tb
:
if
tb
:
_print
(
file
,
'Traceback (
innermost
last):'
)
_print
(
file
,
'Traceback (
most recent call
last):'
)
print_tb
(
tb
,
limit
,
file
)
print_tb
(
tb
,
limit
,
file
)
lines
=
format_exception_only
(
etype
,
value
)
lines
=
format_exception_only
(
etype
,
value
)
for
line
in
lines
[:
-
1
]:
for
line
in
lines
[:
-
1
]:
...
@@ -120,7 +120,7 @@ def format_exception(etype, value, tb, limit = None):
...
@@ -120,7 +120,7 @@ def format_exception(etype, value, tb, limit = None):
these lines are contatenated and printed, exactly the same text is
these lines are contatenated and printed, exactly the same text is
printed as does print_exception()."""
printed as does print_exception()."""
if
tb
:
if
tb
:
list
=
[
'Traceback (
innermost
last):
\n
'
]
list
=
[
'Traceback (
most recent call
last):
\n
'
]
list
=
list
+
format_tb
(
tb
,
limit
)
list
=
list
+
format_tb
(
tb
,
limit
)
else
:
else
:
list
=
[]
list
=
[]
...
@@ -218,8 +218,8 @@ def extract_stack(f=None, limit = None):
...
@@ -218,8 +218,8 @@ def extract_stack(f=None, limit = None):
return value has the same format as for extract_tb(). The optional
return value has the same format as for extract_tb(). The optional
'f' and 'limit' arguments have the same meaning as for print_stack().
'f' and 'limit' arguments have the same meaning as for print_stack().
Each item in the list is a quadruple (filename, line number,
Each item in the list is a quadruple (filename, line number,
function name, text), and the entries are in order from o
utermo
st
function name, text), and the entries are in order from o
lde
st
to
innermo
st stack frame."""
to
newe
st stack frame."""
if
f
is
None
:
if
f
is
None
:
try
:
try
:
raise
ZeroDivisionError
raise
ZeroDivisionError
...
...
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