16 Exceptions16.1 OverviewCommons Math defines a set of exceptions in order to convey the precise low-level cause of failure.16.2 Unchecked ExceptionsStarting from version 3.0, all exceptions generated by the Commons Math code are unchecked (i.e. they inherit from the standard RuntimeException class). The main rationale supporting this design decision is that the exceptions generated in the library are not recoverable: They most of the time result from bad input parameters or some failure due to numerical problems. A thorough discussion of the pros and cons of checked and unchecked exceptions can be read in this post by Bruce Eckel. 16.3 HierarchiesThe exceptions defined by Commons Math follow the Java standard hierarchies:
In all of the above exception hierarchies, several subclasses can exist, each conveying a specific underlying cause of the problem. 16.4 Features
|