@@ -3175,6 +3175,14 @@ public static long getextype(SixModelObject obj, ThreadContext tc) {
3175
3175
else
3176
3176
throw ExceptionHandling .dieInternal (tc , "getextype needs an object with VMException representation" );
3177
3177
}
3178
+ public static long setextype (SixModelObject obj , long category , ThreadContext tc ) {
3179
+ if (obj instanceof VMExceptionInstance ) {
3180
+ ((VMExceptionInstance )obj ).category = category ;
3181
+ return category ;
3182
+ }
3183
+ else
3184
+ throw ExceptionHandling .dieInternal (tc , "setextype needs an object with VMException representation" );
3185
+ }
3178
3186
public static String getmessage (SixModelObject obj , ThreadContext tc ) {
3179
3187
if (obj instanceof VMExceptionInstance ) {
3180
3188
String msg = ((VMExceptionInstance )obj ).message ;
@@ -3184,12 +3192,36 @@ public static String getmessage(SixModelObject obj, ThreadContext tc) {
3184
3192
throw ExceptionHandling .dieInternal (tc , "getmessage needs an object with VMException representation" );
3185
3193
}
3186
3194
}
3195
+ public static String setmessage (SixModelObject obj , String msg , ThreadContext tc ) {
3196
+ if (obj instanceof VMExceptionInstance ) {
3197
+ ((VMExceptionInstance )obj ).message = msg ;
3198
+ return msg ;
3199
+ }
3200
+ else {
3201
+ throw ExceptionHandling .dieInternal (tc , "setmessage needs an object with VMException representation" );
3202
+ }
3203
+ }
3187
3204
public static SixModelObject getpayload (SixModelObject obj , ThreadContext tc ) {
3188
3205
if (obj instanceof VMExceptionInstance )
3189
3206
return ((VMExceptionInstance )obj ).payload ;
3190
3207
else
3191
3208
throw ExceptionHandling .dieInternal (tc , "getpayload needs an object with VMException representation" );
3192
3209
}
3210
+ public static SixModelObject setpayload (SixModelObject obj , SixModelObject payload , ThreadContext tc ) {
3211
+ if (obj instanceof VMExceptionInstance ) {
3212
+ ((VMExceptionInstance )obj ).payload = payload ;
3213
+ return payload ;
3214
+ }
3215
+ else {
3216
+ throw ExceptionHandling .dieInternal (tc , "setpayload needs an object with VMException representation" );
3217
+ }
3218
+ }
3219
+ public static SixModelObject newexception (ThreadContext tc ) {
3220
+ SixModelObject exType = tc .curFrame .codeRef .staticInfo .compUnit .hllConfig .exceptionType ;
3221
+ SixModelObject exObj = (VMExceptionInstance )exType .st .REPR .allocate (tc , exType .st );
3222
+ exObj .initialize (tc );
3223
+ return exObj ;
3224
+ }
3193
3225
public static SixModelObject backtracestrings (SixModelObject obj , ThreadContext tc ) {
3194
3226
if (obj instanceof VMExceptionInstance ) {
3195
3227
SixModelObject Array = tc .curFrame .codeRef .staticInfo .compUnit .hllConfig .listType ;
0 commit comments