@@ -292,6 +292,34 @@ public static StackTraceElement[] javaTraceFromRubyTrace(RubyStackTraceElement[]
292292 return newTrace ;
293293 }
294294
295+ // Deprecated but still used by the overload below
296+ @ Deprecated (since = "9.2.0.0" )
297+ public RaiseException (Ruby runtime , RubyClass exceptionClass , String msg ) {
298+ this (runtime , exceptionClass , msg , null );
299+ }
300+
301+ // Deprecated but still used by jruby-openssl in org.jruby.ext.openssl.Utils.newError
302+ @ Deprecated (since = "9.2.0.0" )
303+ public RaiseException (Ruby runtime , RubyClass exceptionClass , String msg , boolean unused ) {
304+ this (runtime , exceptionClass , msg , null );
305+ }
306+
307+ // Deprecated but still used by the overload below
308+ @ Deprecated (since = "9.2.0.0" )
309+ public RaiseException (Ruby runtime , RubyClass exceptionClass , String msg , IRubyObject backtrace ) {
310+ super (msg == null ? msg = "No message available" : msg );
311+ final ThreadContext context = runtime .getCurrentContext ();
312+ providedMessage = '(' + exceptionClass .getName (context ) + ") " + msg ;
313+ setException (RubyException .newException (context , exceptionClass , RubyString .newUnicodeString (runtime , msg )));
314+ preRaise (context , backtrace , true );
315+ }
316+
317+ // Deprecated but still used by jruby-openssl in org.jruby.ext.openssl.Utils.newErrorWithoutTrace
318+ @ Deprecated (since = "9.2.0.0" )
319+ public RaiseException (Ruby runtime , RubyClass exceptionClass , String msg , IRubyObject backtrace , boolean unused ) {
320+ this (runtime , exceptionClass , msg , backtrace );
321+ }
322+
295323 private boolean requiresBacktrace (ThreadContext context ) {
296324 // We can only omit backtraces of descendents of Standard error for 'foo rescue nil'
297325 return context .exceptionRequiresBacktrace || !(exception instanceof RubyStandardError );
0 commit comments