add exceptions for Java 8

Closes #14