GlenKPeterson / Paguro

Generic, Null-safe, Immutable Collections and Functional Transformations for the JVM
Other
312 stars 24 forks source link

Throw IllegalStateException instead of IllegalAccessError #39

Closed kmark closed 4 years ago

kmark commented 4 years ago

This brings the behavior of PersistentHashMap and PersistentVector in line with the Java Collections framework where we throw subclasses of RuntimeExceptions over Errors.

I've found that as-is I often need to use something along the lines of:

try {} catch (RuntimeException | IllegalAccessError ex) {}

if I know the underyling code uses Paguro.

kmark commented 4 years ago

Thank you! Happy to help!