Fix compiler error caused by referencing Java 8 classes, add messages for terminal/accumulator exceptions