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
e09f1616
Kaydet (Commit)
e09f1616
authored
Nis 25, 2009
tarafından
Thomas Heller
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #5078: Avoid redundant call to FormatError()
üst
208b00d0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
12 deletions
+8
-12
callproc.c
Modules/_ctypes/callproc.c
+8
-12
No files found.
Modules/_ctypes/callproc.c
Dosyayı görüntüle @
e09f1616
...
...
@@ -234,14 +234,12 @@ static TCHAR *FormatError(DWORD code)
}
#ifndef DONT_USE_SEH
void
SetException
(
DWORD
code
,
EXCEPTION_RECORD
*
pr
)
static
void
SetException
(
DWORD
code
,
EXCEPTION_RECORD
*
pr
)
{
TCHAR
*
lpMsgBuf
;
lpMsgBuf
=
FormatError
(
code
);
if
(
lpMsgBuf
)
{
PyErr_SetFromWindowsErr
(
code
);
LocalFree
(
lpMsgBuf
);
}
else
{
/* The 'code' is a normal win32 error code so it could be handled by
PyErr_SetFromWindowsErr(). However, for some errors, we have additional
information not included in the error code. We handle those here and
delegate all others to the generic function. */
switch
(
code
)
{
case
EXCEPTION_ACCESS_VIOLATION
:
/* The thread attempted to read from or write
...
...
@@ -256,6 +254,7 @@ void SetException(DWORD code, EXCEPTION_RECORD *pr)
"exception: access violation writing %p"
,
pr
->
ExceptionInformation
[
1
]);
break
;
case
EXCEPTION_BREAKPOINT
:
/* A breakpoint was encountered. */
PyErr_SetString
(
PyExc_WindowsError
,
...
...
@@ -375,14 +374,11 @@ void SetException(DWORD code, EXCEPTION_RECORD *pr)
PyErr_SetString
(
PyExc_WindowsError
,
"exception: nocontinuable"
);
break
;
default:
printf
(
"error %d
\n
"
,
code
);
PyErr_Format
(
PyExc_WindowsError
,
"exception code 0x%08x"
,
code
);
PyErr_SetFromWindowsErr
(
code
);
break
;
}
}
}
static
DWORD
HandleException
(
EXCEPTION_POINTERS
*
ptrs
,
...
...
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