jruby/jruby — pull request #1864 by grddev (2014-07-27 15:06:26+00:00)
Title: Avoid creating a throwaway raise exception

In particular, a long error message including the java stack trace was being built and then discarded.

In general, it is unclear to me why `createNativeRaiseException` calls `buildMessage` (twice), but for the case where we rewrite an existing stack trace, the message is obviously discarded, so I took the safe route and just specialized the rewrite stack trace case.

Overall, it is unclear to me why exception backtraces are being rewritten from `JavaCallable` and `invokedynamic.InvocationLinker`, whereas in places like `Reflected{Java,Compiled}Method` the exceptions are wrapped in `RaiseException`s.