@@ -68,7 +68,7 @@ public final PException execute(Node raisingNode, PythonBuiltinClassType type, O
68
68
return execute (raisingNode , type , null , cause , format , arguments );
69
69
}
70
70
71
- public abstract PException execute (Node raisingNode , PythonBuiltinClassType type , Object data , Object cause , Object format , Object [] arguments );
71
+ public abstract PException execute (Node raisingNode , PythonBuiltinClassType type , PBaseException . Data data , Object cause , Object format , Object [] arguments );
72
72
73
73
public final PException raise (PythonBuiltinClassType type ) {
74
74
throw execute (this , type , null , PNone .NO_VALUE , PNone .NO_VALUE , PythonUtils .EMPTY_OBJECT_ARRAY );
@@ -86,7 +86,7 @@ public final PException raise(PythonBuiltinClassType type, Object... arguments)
86
86
throw execute (this , type , null , PNone .NO_VALUE , PNone .NO_VALUE , arguments );
87
87
}
88
88
89
- public final PException raiseWithData (PythonBuiltinClassType type , Object data , Object ... arguments ) {
89
+ public final PException raiseWithData (PythonBuiltinClassType type , PBaseException . Data data , Object ... arguments ) {
90
90
throw execute (this , type , data , PNone .NO_VALUE , PNone .NO_VALUE , arguments );
91
91
}
92
92
@@ -168,7 +168,7 @@ public static PException raise(Node raisingNode, PBaseException exc, boolean wit
168
168
}
169
169
170
170
@ Specialization (guards = {"isNoValue(cause)" , "isNoValue(format)" , "arguments.length == 0" , "exceptionType == cachedType" }, limit = "8" )
171
- static PException doPythonBuiltinTypeCached (Node raisingNode , @ SuppressWarnings ("unused" ) PythonBuiltinClassType exceptionType , Object data , @ SuppressWarnings ("unused" ) PNone cause ,
171
+ static PException doPythonBuiltinTypeCached (Node raisingNode , @ SuppressWarnings ("unused" ) PythonBuiltinClassType exceptionType , PBaseException . Data data , @ SuppressWarnings ("unused" ) PNone cause ,
172
172
@ SuppressWarnings ("unused" ) PNone format ,
173
173
@ SuppressWarnings ("unused" ) Object [] arguments ,
174
174
@ Cached ("exceptionType" ) PythonBuiltinClassType cachedType ,
@@ -177,27 +177,29 @@ static PException doPythonBuiltinTypeCached(Node raisingNode, @SuppressWarnings(
177
177
}
178
178
179
179
@ Specialization (guards = {"isNoValue(cause)" , "isNoValue(format)" , "arguments.length == 0" }, replaces = "doPythonBuiltinTypeCached" )
180
- static PException doPythonBuiltinType (Node raisingNode , PythonBuiltinClassType exceptionType , Object data , @ SuppressWarnings ("unused" ) PNone cause , @ SuppressWarnings ("unused" ) PNone format ,
180
+ static PException doPythonBuiltinType (Node raisingNode , PythonBuiltinClassType exceptionType , PBaseException .Data data , @ SuppressWarnings ("unused" ) PNone cause ,
181
+ @ SuppressWarnings ("unused" ) PNone format ,
181
182
@ SuppressWarnings ("unused" ) Object [] arguments ,
182
183
@ Shared ("factory" ) @ Cached PythonObjectFactory factory ) {
183
184
throw raiseExceptionObject (raisingNode , factory .createBaseException (exceptionType , data ));
184
185
}
185
186
186
187
@ Specialization (guards = {"isNoValue(cause)" , "isNoValue(format)" , "arguments.length > 0" })
187
- static PException doBuiltinType (Node raisingNode , PythonBuiltinClassType type , Object data , @ SuppressWarnings ("unused" ) PNone cause , @ SuppressWarnings ("unused" ) PNone format , Object [] arguments ,
188
+ static PException doBuiltinType (Node raisingNode , PythonBuiltinClassType type , PBaseException .Data data , @ SuppressWarnings ("unused" ) PNone cause , @ SuppressWarnings ("unused" ) PNone format ,
189
+ Object [] arguments ,
188
190
@ Shared ("factory" ) @ Cached PythonObjectFactory factory ) {
189
191
throw raiseExceptionObject (raisingNode , factory .createBaseException (type , data , factory .createTuple (arguments )));
190
192
}
191
193
192
194
@ Specialization (guards = {"isNoValue(cause)" })
193
- static PException doBuiltinType (Node raisingNode , PythonBuiltinClassType type , Object data , @ SuppressWarnings ("unused" ) PNone cause , String format , Object [] arguments ,
195
+ static PException doBuiltinType (Node raisingNode , PythonBuiltinClassType type , PBaseException . Data data , @ SuppressWarnings ("unused" ) PNone cause , String format , Object [] arguments ,
194
196
@ Shared ("factory" ) @ Cached PythonObjectFactory factory ) {
195
197
assert format != null ;
196
198
throw raiseExceptionObject (raisingNode , factory .createBaseException (type , data , format , arguments ));
197
199
}
198
200
199
201
@ Specialization (guards = {"!isNoValue(cause)" })
200
- static PException doBuiltinTypeWithCause (Node raisingNode , PythonBuiltinClassType type , Object data , PBaseException cause , String format , Object [] arguments ,
202
+ static PException doBuiltinTypeWithCause (Node raisingNode , PythonBuiltinClassType type , PBaseException . Data data , PBaseException cause , String format , Object [] arguments ,
201
203
@ Shared ("factory" ) @ Cached PythonObjectFactory factory ) {
202
204
assert format != null ;
203
205
PBaseException baseException = factory .createBaseException (type , data , format , arguments );
0 commit comments