@@ -133,26 +133,6 @@ static void setup_handler() {
133133}
134134#endif
135135
136- bool maybe_print_custom_stack ( vdynamic * ret ) {
137- hl_type * exct = ret -> t ;
138- while ( exct -> kind == HOBJ ) {
139- if ( exct -> obj -> super == NULL ) {
140- if ( ucmp (exct -> obj -> name , USTR ("haxe.Exception" )) == 0 ) {
141- hl_field_lookup * f = hl_lookup_find (exct -> obj -> rt -> lookup , exct -> obj -> rt -> nlookup , hl_hash_gen (USTR ("__customStack" ), true));
142- if ( f == NULL || f -> field_index < 0 ) break ;
143- vdynamic * customStack = * (vdynamic * * )((char * )(ret ) + f -> field_index );
144- if ( customStack != NULL ) {
145- uprintf (USTR ("Custom stack:%s\n" ), hl_to_string (customStack ));
146- return true;
147- }
148- }
149- break ;
150- }
151- exct = exct -> obj -> super ;
152- }
153- return false;
154- }
155-
156136#ifdef HL_WIN
157137int wmain (int argc , pchar * argv []) {
158138#else
@@ -261,8 +241,8 @@ int main(int argc, pchar *argv[]) {
261241 hl_profile_end ();
262242 if ( isExc ) {
263243 uprintf (USTR ("Uncaught exception: %s\n" ), hl_to_string (ctx .ret ));
264- if ( !maybe_print_custom_stack (ctx .ret ) ) {
265- varray * a = hl_exception_stack ();
244+ if ( !hl_maybe_print_custom_stack (ctx .ret ) ) {
245+ varray * a = hl_exception_stack ();
266246 int i ;
267247 for ( i = 0 ; i < a -> size ; i ++ )
268248 uprintf (USTR ("Called from %s\n" ), hl_aptr (a , uchar * )[i ]);
0 commit comments