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
551ffae3
Kaydet (Commit)
551ffae3
authored
Ara 03, 2001
tarafından
Fred Drake
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Clarify that the Python runtime may behave mysteriously when an exception
is not handled properly. This closes SF bug #485153.
üst
3570551d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
exceptions.tex
Doc/api/exceptions.tex
+12
-4
No files found.
Doc/api/exceptions.tex
Dosyayı görüntüle @
551ffae3
...
...
@@ -8,11 +8,19 @@ thread) of the last error that occurred. Most functions don't clear
this on success, but will set it to indicate the cause of the error on
failure. Most functions also return an error indicator, usually
\NULL
{}
if they are supposed to return a pointer, or
\code
{
-1
}
if they
return an integer (exception: the
\cfunction
{
PyArg
_
Parse*()
}
functions
return
\code
{
1
}
for success and
\code
{
0
}
for failure). When a
function must fail because some function it called failed, it
return an integer (exception: the
\cfunction
{
PyArg
_
*()
}
functions
return
\code
{
1
}
for success and
\code
{
0
}
for failure).
When a function must fail because some function it called failed, it
generally doesn't set the error indicator; the function it called
already set it.
already set it. It is responsible for either handling the error and
clearing the exception or returning after cleaning up any resources it
holds (such as object references or memory allocations); it should
\emph
{
not
}
continue normally if it is not prepared to handle the
error. If returning due to an error, it is important to indicate to
the caller that an error has been set. If the error is not handled or
carefully propogated, additional calls into the Python/C API may not
behave as intended and may fail in mysterious ways.
The error indicator consists of three Python objects corresponding to
\withsubitem
{
(in module sys)
}{
...
...
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