Skip to content

Commit 184bc51

Browse files
committed
[refactor] avoid NativeException usage (jruby/jruby#5646)
1 parent 176997f commit 184bc51

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/main/java/org/jruby/ext/openssl/ASN1.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1431,12 +1431,6 @@ static void printArray(final PrintStream out, final int indent, final RubyArray
14311431
}
14321432
}
14331433

1434-
static RaiseException createNativeRaiseException(final ThreadContext context,
1435-
final Throwable e) {
1436-
Throwable cause = e.getCause(); if ( cause == null ) cause = e;
1437-
return RaiseException.createNativeRaiseException(context.runtime, cause);
1438-
}
1439-
14401434
}
14411435

14421436
public static class Primitive extends ASN1Data {
@@ -1672,7 +1666,7 @@ ASN1Encodable toASN1(final ThreadContext context) {
16721666
}
16731667
catch (Exception e) { // TODO exception handling
16741668
debugStackTrace(context.runtime, e);
1675-
throw createNativeRaiseException(context, e);
1669+
throw Utils.newError(context.runtime, context.runtime.getRuntimeError(), e);
16761670
}
16771671
}
16781672

0 commit comments

Comments
 (0)