Skip to main content

Exceptionhandling in C++

  • Chapter
  • First Online:
Softwareentwicklung mit C++

Part of the book series: Studienbücher Informatik ((SBI))

  • 8912 Accesses

Zusammenfassung

In allen bisher besprochenen Kapiteln sind wir davon ausgegangen, dass immer alles so funktioniert, wie wir es erhoffen. Nun ist die gelebte Realität bei weitem nicht so. Ein einfaches new kann einmal nicht funktionieren; der Speicher ist einfach defekt und es kann deshalb kein Speicher reserviert werden. Was tun? Wie geht man damit um? Die allgemein angetroffene These ist dann meist, dass man da auch nichts tun kann. Sicherlich, Sie können nicht verhindern, dass es zu so einem Ausfall kommt, aber Sie können Vorkehrungen treffen, dass bei einem solchen Ausfall das Programm nicht gleich terminiert. Und Sie sollten sich ”workarounds” ”stricken”, die sicherstellen, dass Sie einen solchen Ausfall leicht im Nachhinein detektieren können. Oder stellen Sie sich einfach vor, Sie haben einen Softwarefehler gemacht – niemand ist vollkommen. Wie können Sie diesen feststellen? Oder ein Nutzer Ihrer Software bedient diese so, wie er es nicht tun sollte; das Programm stürzt ab. Wie detektieren Sie eine derartige ”Fehlbedienung”? In diesem Kapitel wollen wir solche Fehlersituationen behandeln und Lösungen kennenlernen, wie man in bestimmten Situationen reagieren sollte.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 49.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 64.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Dieter Duschl .

Rights and permissions

Reprints and permissions

Copyright information

© 2017 Springer Fachmedien Wiesbaden GmbH

About this chapter

Cite this chapter

Duschl, D. (2017). Exceptionhandling in C++. In: Softwareentwicklung mit C++. Studienbücher Informatik. Springer Vieweg, Wiesbaden. https://doi.org/10.1007/978-3-658-18123-9_7

Download citation

Publish with us

Policies and ethics