Skip to main content
Top

2023 | OriginalPaper | Chapter

10. Organizing Exceptions

Author : Vaskaran Sarcar

Published in: Simple and Efficient Programming with C#

Publisher: Apress

Activate our intelligent search to find suitable subject content or patents.

search-config
loading …

Abstract

Errors in a program can be classified into the following categories: compile-time errors and runtime errors. Compile-time errors are comparatively easy to fix because you know about them much earlier (i.e., at compile time). These may occur mainly due to syntax errors or typing mistakes. The compiler can point to them so that you can take corrective measures immediately. By contrast, runtime errors are dangerous because you encounter them when a program is executing. Programmatically, we call them exceptions. Since the program was compiled earlier, you expected it to run successfully. Why do exceptions occur? These may occur through some careless mistakes; maybe you have implemented the wrong logic, you have ignored some loopholes in the code paths of the program, etc. This type of error is tough to handle and is costly. Even after our best efforts, often these situations are unavoidable. It is also true that many of the failures are beyond the control of a programmer. So, handling these runtime errors is essential when you write an application. C#’s exception handling mechanism is important because it helps you deal with these typical runtime errors in advance.

Dont have a licence yet? Then find out more about our products and how to get one now:

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Metadata
Title
Organizing Exceptions
Author
Vaskaran Sarcar
Copyright Year
2023
Publisher
Apress
DOI
https://doi.org/10.1007/978-1-4842-8737-8_10

Premium Partner