4
  1. Is there a universally accepted classification of error handling strategies?
  2. What is a general term to refer to those strategies, which can be used while searching for books and articles that compare error handling strategies in different languages?

Some languages, such as C and Go, report errors via exit codes. Another common strategy is to use exceptions, which may be checked (Java) or unchecked (most other languages). I'm looking for the above answers to get a clearer understanding of different possibilities in different languages. For example: Are there ways of error handling that don't fit into these broad categories? Is the Erlang "let it crash" philosophy a subtype of exception-based error handling or is it something orthogonal? How does the Common Lisp condition system fit into the picture? How about continuations?

Simple analogy: if somebody asked me about, say, classification of programming languages, I'd say that the key words are "programming paradigms", the most popular paradigms are imperative, functional and object-oriented, and a detailed discussion can be found e.g. in the classic textbook by Peter Van Roy. I'm looking for this kind of answer about error handling. I don't even know what to search for, googling "error handling paradigms" only returns language-specific results.

5
  • 1
    The pure functional approach to this is to use a generic sum type such as Either or Maybe and return a value indicating the failure Commented Sep 16, 2016 at 16:22
  • I edited the question to make it clearer what I'm asking. Commented Sep 16, 2016 at 16:30
  • 1
    Continuations are related to errors in the same way as "if/then/else": they have other uses in general. Commented Sep 16, 2016 at 16:52
  • 1
    There's some classification on c2.com/cgi/wiki?CategoryException Commented Sep 16, 2016 at 17:38
  • I removed the third question. Now you really can't say it's too broad. The first question can be answered with either "No", or with providing the generally accepted classification. The answer to the second question is a term, which is something very short and concise. Commented Sep 17, 2016 at 7:13

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.