OSR » Exceptionless error management

Exceptionless error management

Rationale

The OCaml standard library uses exceptions to signal unexceptional error cases. The canonical example is to raise Not_found to signal the absence of a result (Hashtbl.find, Map.find, Set.choose, List.find etc.). However there are a number of disavantages in doing so, the principal ones being enumerated below.

Recommendations

Two candidate recommendations have been drafted:

  1. OSR/Exceptionless Error Management/Recommendation Candidate 1
  2. OSR/Exceptionless Error Management/Recommendation Candidate 2