summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-03-18 20:10:29 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-03-18 20:10:29 +0000
commitc7d6bfb246054926d9f90d7da2845febddfc90b7 (patch)
tree0dba862e90f987b044394f9dc279623a2a7be7e1 /toke.c
parent151afd43bea82dd30ddad05d5473070608c1d3fb (diff)
downloadperl-c7d6bfb246054926d9f90d7da2845febddfc90b7.tar.gz
queued errors may not be displayed after the PL_error_count limit
p4raw-id: //depot/perl@5806
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/toke.c b/toke.c
index 2d96802683..3745071f42 100644
--- a/toke.c
+++ b/toke.c
@@ -7304,8 +7304,14 @@ Perl_yyerror(pTHX_ char *s)
Perl_warn(aTHX_ "%"SVf, msg);
else
qerror(msg);
- if (PL_error_count >= 10)
- Perl_croak(aTHX_ "%s has too many errors.\n", CopFILE(PL_curcop));
+ if (PL_error_count >= 10) {
+ if (PL_in_eval && SvCUR(ERRSV))
+ Perl_croak(aTHX_ "%_%s has too many errors.\n",
+ ERRSV, CopFILE(PL_curcop));
+ else
+ Perl_croak(aTHX_ "%s has too many errors.\n",
+ CopFILE(PL_curcop));
+ }
PL_in_my = 0;
PL_in_my_stash = Nullhv;
return 0;