Fix NoMethodError for NilClass for Java backtraces
Created by: lordofthelake
On JRuby, the source of the error can come from Java code (JRuby internals). In that case the line format is not guaranteed to follow the Ruby format, making the Regex fail. In that case, let's handle that gracefully instead of raising an exception that hides the original cause.