Skip to content

Commit 697a55c

Browse files
committed
[refactor] avoid deprecated RaiseExcetion constructor
to make sure we have the proper RaiseException sub-class
1 parent d919e0d commit 697a55c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/main/java/org/jruby/rack/util/ExceptionUtils.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525

2626
import java.io.IOException;
2727

28-
import org.jruby.NativeException;
2928
import org.jruby.Ruby;
3029
import org.jruby.RubyArray;
3130
import org.jruby.RubyClass;
@@ -58,7 +57,7 @@ public static RaiseException newIOError(final Ruby runtime, final IOException ca
5857
private static RaiseException newRaiseException(final Ruby runtime,
5958
final RubyClass errorClass, final Throwable cause) {
6059
final String message = cause.getMessage();
61-
RaiseException raise = new RaiseException(runtime, errorClass, message, true);
60+
RaiseException raise = RaiseException.from(runtime, errorClass, message);
6261
raise.initCause(cause);
6362
return raise;
6463
}

0 commit comments

Comments
 (0)