File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
src/main/java/org/truffleruby/cext Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -1322,12 +1322,17 @@ public Object unwrap(Object value,
1322
1322
Object object = unwrapNode .execute (value );
1323
1323
if (object == null ) {
1324
1324
exceptionProfile .enter ();
1325
- throw new RaiseException (getContext (), coreExceptions ().runtimeError ("native handle not found" , this ));
1325
+ throw new RaiseException (getContext (), coreExceptions ().runtimeError (exceptionMessage ( value ) , this ));
1326
1326
} else {
1327
1327
return object ;
1328
1328
}
1329
1329
}
1330
1330
1331
+ @ TruffleBoundary
1332
+ private String exceptionMessage (Object value ) {
1333
+ return String .format ("native handle not found (%s)" , value );
1334
+ }
1335
+
1331
1336
protected UnwrapNode createUnwrapNode () {
1332
1337
return UnwrapNodeGen .create ();
1333
1338
}
You can’t perform that action at this time.
0 commit comments