improve recursive error messages!
authorJoshua Pritikin <joshua.pritikin@db.com>
Fri, 26 Jun 1998 10:02:32 +0000 (06:02 -0400)
committerGurusamy Sarathy <gsar@cpan.org>
Sun, 28 Jun 1998 20:36:08 +0000 (20:36 +0000)
Message-Id: <H00000e500081d28@MHS>

p4raw-id: //depot/perl@1245

gv.c
pod/perldiag.pod
universal.c

diff --git a/gv.c b/gv.c
index 0a36370..ea78d20 100644 (file)
--- 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)) );
 
index d8323f2..b588856 100644 (file)
@@ -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
index 72da1e4..ef4f5b3 100644 (file)
@@ -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);