From: Joshua Pritikin Date: Fri, 26 Jun 1998 10:02:32 +0000 (-0400) Subject: improve recursive error messages! X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3e0ccd427679e11020bfe0a22532e0a9a22a3d28;p=p5sagit%2Fp5-mst-13.2.git improve recursive error messages! Message-Id: p4raw-id: //depot/perl@1245 --- diff --git a/gv.c b/gv.c index 0a36370..ea78d20 100644 --- a/gv.c +++ b/gv.c @@ -162,7 +162,8 @@ gv_fetchmeth(HV *stash, char *name, STRLEN len, I32 level) if (!stash) return 0; if ((level > 100) || (level < -100)) - croak("Recursive inheritance detected"); + croak("Recursive inheritance detected while looking for method '%s' in package '%s'", + name, HvNAME(stash)); DEBUG_o( deb("Looking for method %s in package %s\n",name,HvNAME(stash)) ); diff --git a/pod/perldiag.pod b/pod/perldiag.pod index d8323f2..b588856 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -2069,11 +2069,16 @@ Check your logic flow. desired output is compiled into Perl, which entails some overhead, which is why it's currently left out of your copy. -=item Recursive inheritance detected +=item Recursive inheritance detected in package '%s' (F) More than 100 levels of inheritance were used. Probably indicates an unintended loop in your inheritance hierarchy. +=item Recursive inheritance detected while looking for method '%s' in package '%s' + +(F) More than 100 levels of inheritance were encountered while invoking a +method. Probably indicates an unintended loop in your inheritance hierarchy. + =item Reference found where even-sized list expected (W) You gave a single reference where Perl was expecting a list with diff --git a/universal.c b/universal.c index 72da1e4..ef4f5b3 100644 --- a/universal.c +++ b/universal.c @@ -21,7 +21,7 @@ isa_lookup(HV *stash, char *name, int len, int level) return &sv_yes; if (level > 100) - croak("Recursive inheritance detected"); + croak("Recursive inheritance detected in package '%s'", HvNAME(stash)); gvp = (GV**)hv_fetch(stash, "::ISA::CACHE::", 14, FALSE);