Skip to Main Content
 

Global Search Box

 
 
 
 

Files

ETD Abstract Container

Abstract Header

Error Handling Approaches in Programming Languages

Rees-Hill, Joey Aldrin

Abstract Details

2022, BA, Oberlin College, Computer Science.
Error handling is a part of nearly every computer program, but it is rarely the main focus of a program's developers. Nevertheless, correct error handling is important because it can enable a program to recover from abnormal circumstances and continue to function and serve its purpose. Programming languages offer a variety of tools and approaches for programs to detect and handle errors. I investigated the different approaches to error handling in contemporary programming languages. I found three general paradigms of error handling approaches. One paradigm was Special Return Value, in which certain return values of a function signify that an error occurred. Another paradigm was Try-Catch, where exception objects can be raised at some point in code and intercepted and handled by guards further up in the call stack. The final paradigm was Type System Approaches, in which languages used their type system to encode possible failures and ensure proper handling of these states. Besides the three main paradigms, I found several smaller or auxiliary features, such as Defer, Checked Exceptions, and Automatically Closing Resources. In addition, I compared an error handling feature originally created as an academic proposal (Compensations) with actual implementations of a similar feature in modern languages, finding that the actual implementation is more straightforward at the cost of being somewhat less powerful.
Stephen Checkoway (Advisor)
13 p.

Recommended Citations

Citations

  • Rees-Hill, J. A. (2022). Error Handling Approaches in Programming Languages [Undergraduate thesis, Oberlin College]. OhioLINK Electronic Theses and Dissertations Center. http://rave.ohiolink.edu/etdc/view?acc_num=oberlin1654445516420205

    APA Style (7th edition)

  • Rees-Hill, Joey. Error Handling Approaches in Programming Languages. 2022. Oberlin College, Undergraduate thesis. OhioLINK Electronic Theses and Dissertations Center, http://rave.ohiolink.edu/etdc/view?acc_num=oberlin1654445516420205.

    MLA Style (8th edition)

  • Rees-Hill, Joey. "Error Handling Approaches in Programming Languages." Undergraduate thesis, Oberlin College, 2022. http://rave.ohiolink.edu/etdc/view?acc_num=oberlin1654445516420205

    Chicago Manual of Style (17th edition)