Bugs: Browse | Download .csv
There is presently some inconsistency in the choice of exceptions in the Batteries library. For example, within the List module there is an Empty_list exception which is thrown by (List.hd []) or (List.tl []). However, (List.reduce []) raises (Invalid_argument "List.reduce: empty list"). Similarly, the newly added (early Tue, 24 Mar 2009, according to gitweb) Seq module uses the Failure exception in several places. This may be due to the module being newly added, but it is what sparked my notice of this. A consistent approach to thrown exceptions across Batteries modules would be nice to have before the 1.0 API is declared as fixed.