@@ -211,32 +211,31 @@ static void setCurrentException(Frame frame, GraalHPyContext nativeContext, PExc
211
211
@ GenerateUncached
212
212
public abstract static class HPyRaiseNode extends Node {
213
213
214
- public final int raiseInt (Frame frame , GraalHPyContext nativeContext , int errorValue , Object errType , String format , Object ... arguments ) {
214
+ public final int raiseInt (Frame frame , GraalHPyContext nativeContext , int errorValue , PythonBuiltinClassType errType , String format , Object ... arguments ) {
215
215
return executeInt (frame , nativeContext , errorValue , errType , format , arguments );
216
216
}
217
217
218
- public final Object raise (Frame frame , GraalHPyContext nativeContext , Object errorValue , Object errType , String format , Object ... arguments ) {
218
+ public final Object raise (Frame frame , GraalHPyContext nativeContext , Object errorValue , PythonBuiltinClassType errType , String format , Object ... arguments ) {
219
219
return execute (frame , nativeContext , errorValue , errType , format , arguments );
220
220
}
221
221
222
- public final int raiseIntWithoutFrame (GraalHPyContext nativeContext , int errorValue , Object errType , String format , Object ... arguments ) {
222
+ public final int raiseIntWithoutFrame (GraalHPyContext nativeContext , int errorValue , PythonBuiltinClassType errType , String format , Object ... arguments ) {
223
223
return executeInt (null , nativeContext , errorValue , errType , format , arguments );
224
224
}
225
225
226
- public final Object raiseWithoutFrame (GraalHPyContext nativeContext , Object errorValue , Object errType , String format , Object ... arguments ) {
226
+ public final Object raiseWithoutFrame (GraalHPyContext nativeContext , Object errorValue , PythonBuiltinClassType errType , String format , Object ... arguments ) {
227
227
return execute (null , nativeContext , errorValue , errType , format , arguments );
228
228
}
229
229
230
- public abstract Object execute (Frame frame , GraalHPyContext nativeContext , Object errorValue , Object errType , String format , Object [] arguments );
230
+ public abstract Object execute (Frame frame , GraalHPyContext nativeContext , Object errorValue , PythonBuiltinClassType errType , String format , Object [] arguments );
231
231
232
- public abstract int executeInt (Frame frame , GraalHPyContext nativeContext , int errorValue , Object errType , String format , Object [] arguments );
232
+ public abstract int executeInt (Frame frame , GraalHPyContext nativeContext , int errorValue , PythonBuiltinClassType errType , String format , Object [] arguments );
233
233
234
234
@ Specialization
235
- static int doInt (Frame frame , GraalHPyContext nativeContext , int errorValue , Object errType , String format , Object [] arguments ,
235
+ static int doInt (Frame frame , GraalHPyContext nativeContext , int errorValue , PythonBuiltinClassType errType , String format , Object [] arguments ,
236
236
@ Shared ("raiseNode" ) @ Cached PRaiseNode raiseNode ,
237
237
@ Shared ("transformExceptionToNativeNode" ) @ Cached HPyTransformExceptionToNativeNode transformExceptionToNativeNode ) {
238
238
try {
239
- // TODO Should properly construct the exception using its constructor
240
239
throw raiseNode .execute (raiseNode , errType , PNone .NO_VALUE , format , arguments );
241
240
} catch (PException p ) {
242
241
transformExceptionToNativeNode .execute (frame , nativeContext , p );
@@ -245,11 +244,10 @@ static int doInt(Frame frame, GraalHPyContext nativeContext, int errorValue, Obj
245
244
}
246
245
247
246
@ Specialization
248
- static Object doObject (Frame frame , GraalHPyContext nativeContext , Object errorValue , Object errType , String format , Object [] arguments ,
247
+ static Object doObject (Frame frame , GraalHPyContext nativeContext , Object errorValue , PythonBuiltinClassType errType , String format , Object [] arguments ,
249
248
@ Shared ("raiseNode" ) @ Cached PRaiseNode raiseNode ,
250
249
@ Shared ("transformExceptionToNativeNode" ) @ Cached HPyTransformExceptionToNativeNode transformExceptionToNativeNode ) {
251
250
try {
252
- // TODO Should properly construct the exception using its constructor
253
251
throw raiseNode .execute (raiseNode , errType , PNone .NO_VALUE , format , arguments );
254
252
} catch (PException p ) {
255
253
transformExceptionToNativeNode .execute (frame , nativeContext , p );
0 commit comments