Exception handling is a mechanism wherein a Programming assemble is used to Constantly entice, intercept and deal with the mistake occurred at some stage in application execution. The Common Language Runtime (CLR) of .NET Framework is designed to use an exception coPing with Model based on exception gadgets and guarded Blocks of Code.
The features of exception coping with mechanism implemented in CLR are as follows:
a) Each language can have its Personal specification for handling exceptions without any restrictions
b) Exceptions are generated and dealt with regardless of the language used and Form of code (managed or unmanaged)
c) Exceptions may be thrown throughout manner or gadget barriers
.NET runtime throws exceptions as Objects derived from SySTEM.Exception elegance that contain blunders info, inclusive of message and line of code wherein the mistake occurred, and so on. The Construct "strive..Capture..Finally" is used for exception handling. While "try" (wherein exceptions are predicted) and “seize” (in which exceptions are treated) bLocks are obligatory, the "finally" (where code done anyways) block is non-obligatory.
When compared to error dealing with carried out the use of conventional strategies – like utilization of go back code as in Component Object Model (COM) and "cross to" Statements, as in Visual Basic, etc. – the main advantages of exceptions in .NET are trapping of all diSASters, elimination of process of checking return cost and its utilization (if invalid) in programs, utilization in Eventualities where there's no return fee together with Constructors, elevated reliability and higher overall performance.
While Java offers "checked" exceptions that help in stopping prevalence of unhandled exceptions throughout compilation, they can't be used for mistakes which can be unrecoverable Failure. Exception dealing with in C differs from that during .NET by not having the "finally" block for cleaning up resources and with none restrict for the form of exception.
If you have a better way to define the term "Exception Handling" or any additional information that could enhance this page, please share your thoughts with us.
We're always looking to improve and update our content. Your insights could help us provide a more accurate and comprehensive understanding of Exception Handling.
Whether it's definition, Functional context or any other relevant details, your contribution would be greatly appreciated.
Thank you for helping us make this page better!
Obviously, if you're interested in more information about Exception Handling, search the above topics in your favorite search engine.
Score: 5 out of 5 (1 voters)
Be the first to comment on the Exception Handling definition article
Tech-Term.com© 2024 All rights reserved