Kernel#fail should handle java exceptions

Fixes #1641
Merge pull request #1667 from atambo/fail_should_handle_java_exceptions

Kernel#fail should handle java exceptions