File tree 1 file changed +12
-2
lines changed 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -202,13 +202,23 @@ S_mro_get_linear_isa_c3(pTHX_ HV* stash, U32 level)
202
202
/* If we had candidates, but nobody won, then the @ISA
203
203
hierarchy is not C3-incompatible */
204
204
if (!winner ) {
205
+ SV * errmsg ;
206
+ I32 i ;
207
+
208
+ errmsg = newSVpvf ("Inconsistent hierarchy during C3 merge of class '%s':\n\t"
209
+ "current merge results [\n" , HEK_KEY (stashhek ));
210
+ for (i = 0 ; i <= av_len (retval ); i ++ ) {
211
+ SV * * elem = av_fetch (retval , i , 0 );
212
+ sv_catpvf (errmsg , "\t\t%" SVf ",\n" , SVfARG (* elem ));
213
+ }
214
+ sv_catpvf (errmsg , "\t]\n\tmerging failed on '%" SVf "'" , SVfARG (cand ));
215
+
205
216
/* we have to do some cleanup before we croak */
206
217
207
218
SvREFCNT_dec (retval );
208
219
Safefree (heads );
209
220
210
- Perl_croak (aTHX_ "Inconsistent hierarchy during C3 merge of class '%s': "
211
- "merging failed on parent '%" SVf "'" , HEK_KEY (stashhek ), SVfARG (cand ));
221
+ Perl_croak (aTHX_ "%" SVf , SVfARG (errmsg ));
212
222
}
213
223
}
214
224
}
You can’t perform that action at this time.
0 commit comments