Skip to content

Commit 158ce55

Browse files
kareschadlwilson
authored andcommitted
[refactor] avoid deprecated RaiseExcetion constructor
to make sure we have the proper RaiseException sub-class (cherry picked from commit 697a55c)
1 parent 2471e0e commit 158ce55

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;
@@ -69,7 +68,7 @@ static RaiseException newRaiseException(final Ruby runtime,
6968
private static RaiseException newRaiseException(final Ruby runtime,
7069
final RubyClass errorClass, final Throwable cause) {
7170
final String message = cause.getMessage();
72-
RaiseException raise = new RaiseException(runtime, errorClass, message, true);
71+
RaiseException raise = RaiseException.from(runtime, errorClass, message);
7372
raise.initCause(cause);
7473
return raise;
7574
}

0 commit comments

Comments
 (0)