Dont explode on JRuby error, fixes #1653