File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/main/java/org/truffleruby/cext Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 13
13
import static org .truffleruby .cext .ValueWrapperManager .TRUE_HANDLE ;
14
14
import static org .truffleruby .cext .ValueWrapperManager .UNDEF_HANDLE ;
15
15
16
+ import com .oracle .truffle .api .CompilerDirectives ;
16
17
import org .truffleruby .RubyContext ;
17
18
import org .truffleruby .RubyLanguage ;
18
19
import org .truffleruby .cext .UnwrapNodeGen .NativeToWrapperNodeGen ;
@@ -88,15 +89,15 @@ protected Object unwrapTaggedObject(long handle,
88
89
89
90
@ TruffleBoundary
90
91
private void raiseError (long handle ) {
91
- throw new RuntimeException ("dead handle 0x" + Long .toHexString (handle ));
92
+ throw CompilerDirectives . shouldNotReachHere ("dead handle 0x" + Long .toHexString (handle ));
92
93
}
93
94
94
95
@ Fallback
95
96
@ TruffleBoundary
96
97
protected ValueWrapper unWrapUnexpectedHandle (long handle ) {
97
98
// Avoid throwing a specialization exception when given an uninitialized or corrupt
98
99
// handle.
99
- throw new RuntimeException ("corrupt handle 0x" + Long .toHexString (handle ));
100
+ throw CompilerDirectives . shouldNotReachHere ("corrupt handle 0x" + Long .toHexString (handle ));
100
101
}
101
102
102
103
public static UnwrapNativeNode create () {
You can’t perform that action at this time.
0 commit comments