Delphi Language Guide Delphi for Microsoft Win32 Delphi for the Microsoft. Net framework


Exceptions and Runtime Errors in Libraries



Yüklə 0,84 Mb.
Pdf görüntüsü
səhifə212/294
tarix02.01.2022
ölçüsü0,84 Mb.
#41395
1   ...   208   209   210   211   212   213   214   215   ...   294
DelphiLanguageGuide

Exceptions and Runtime Errors in Libraries
When an exception is raised but not handled in a dynamically loadable library, it propagates out of the library to the
caller. If the calling application or library is itself written in Delphi, the exception can be handled through a normal
try...except statement.
On Win32, if the calling application or library is written in another language, the exception can be handled as an
operating-system exception with the exception code 
$0EEDFADE
. The first entry in the 
ExceptionInformation
array of the operating-system exception record contains the exception address, and the second entry contains a
reference to the Delphi exception object.
184


Generally, you should not let exceptions escape from your library. Delphi exceptions map to the OS exception model
(including the .NET exception model)..
If a library does not use the 
SysUtils
 unit, exception support is disabled. In this case, when a runtime error occurs
in the library, the calling application terminates. Because the library has no way of knowing whether it was called
from a Delphi program, it cannot invoke the application's exit procedures; the application is simply aborted and
removed from memory.

Yüklə 0,84 Mb.

Dostları ilə paylaş:
1   ...   208   209   210   211   212   213   214   215   ...   294




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©azkurs.org 2024
rəhbərliyinə müraciət

gir | qeydiyyatdan keç
    Ana səhifə


yükləyin