Back to search

Oberlin College Honors Theses

Error Handling Approaches in Programming Languages

Abstract

dc:description

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.

Degree

thesis:*
Name thesis:degree_name
BA
Level thesis:degree_level
bachelors
Discipline thesis:degree_discipline
Computer Science
Grantor dc:publisher
Oberlin College Honors Theses
Year dc:date
2022

Author and committee

dc:creator, dc:contributor.*
Author dc:creator
  • Rees-Hill, Joey Aldrin
Advisor dc:contributor.advisor
  • Checkoway, Stephen

Subjects

dc:subject × 10

Rights

dc:rights
Statement dc:rights
  • unrestricted
  • This thesis or dissertation is protected by copyright: some rights reserved. It is licensed for use under a Creative Commons license. Specific terms and permissions are available from this document's record in the OhioLINK ETD Center.
Language dc:language
English

Identifiers

dc:identifier.*

Chain of custody

source
Harvested from
OhioLINK
Base URL
etd.ohiolink.edu/acprod/odb_etd/ws/oai/oai
Last updated
2026-11-27
Source record
OAI-PMH GetRecord
citation

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