Skip to main content

Exception handling

  • Chapter
Programming in Modula-3

Abstract

Thus far we have concentrated on writing programs as correctly as possible. However, each program is embedded in a larger context and must communicate with its environment. We make a number of assumptions about the environment (indeed, we incorporate these assumptions into our programs) that must apply in order for our program to work at all: input data must be present, there must be space on the hard disk for writing results, numeric values must be in certain valid ranges, etc. However, certainly some exception situations arise where these assumptions do not apply. The program must handle these situations also, without crashing or producing erroneous results. In addition, we could design the program so that it tests all possible errors in every Situation. However, this strategy would prove quite involved and unnatural.

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

Access this chapter

eBook
USD 16.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.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

Rights and permissions

Reprints and permissions

Copyright information

© 1996 Springer-Verlag Berlin Heidelberg

About this chapter

Cite this chapter

Böszörményi, L., Weich, C. (1996). Exception handling. In: Programming in Modula-3. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-60940-4_15

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-60940-4_15

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-64614-0

  • Online ISBN: 978-3-642-60940-4

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics