Root > Advanced topics > Using EurekaLog in DLL > Introduction > What is exception

What is exception

Previous pageReturn to chapter overviewNext page   

Exception is represented by an object (class instance) in most modern high-level programming languages. This means that exceptions can be inherited from base classes, as well as be extended with arbitrary properties.

 

Since exception is a way to interrupt normal execution path of a code - it requires support from hardware level. Modern CPUs provides such support. However, user-mode applications do not have direct access to the hardware. Therefore, operating system provides method to use exceptions on particular hardware. This is called SEH ("Structured Exception Handling") in Windows.

 

Exception on operating system level is represented by its address, code, options ("flags") and up to 15 4-byte integers ("params"). High-level programming languages use SEH and this low-level representation as basis for their own exception handling. For example, exception in high-level programming language (i.e. exception object) is implemented as OS exception with special code (for example: $EEECFADE for Delphi) and pointer to object is stored in exception params. Exceptions with other codes are wrapped in generic class (EExternalException for Delphi).

 

Short conclusion:

1. There are 3 levels of exceptions support: hardware, OS, and programming language.
2. User-mode code has access to OS and language levels.
3. OS exceptions are compatible among all programming languages.
4. Language exceptions are specific to programming language and could not be properly used in another programming language.

 

 

See also:




Send feedback... Build date: 2018-11-26
Last edited: 2018-06-14
PRIVACY STATEMENT
The documentation team uses the feedback submitted to improve the EurekaLog documentation. We do not use your e-mail address for any other purpose. We will remove your e-mail address from our system after the issue you are reporting has been resolved. While we are working to resolve this issue, we may send you an e-mail message to request more information about your feedback. After the issues have been addressed, we may send you an email message to let you know that your feedback has been addressed.


Permanent link to this article: https://www.eurekalog.com/help/eurekalog/dll_what_is_exception.php