Branch: refs/heads/yves/consistent_error_exits Home: https://github.com/Perl/perl5 Commit: a161529369fa367cabb072bbf45f2b8059b2f445 https://github.com/Perl/perl5/commit/a161529369fa367cabb072bbf45f2b8059b2f445 Author: Yves Orton <demer...@gmail.com> Date: 2022-10-18 (Tue, 18 Oct 2022)
Changed paths: M embed.fnc M embed.h M pp_ctl.c M proto.h M t/op/die.t M t/op/eval.t M util.c Log Message: ----------- toke.c - invoke __DIE__ handler after compilation errors in eval Currently whether the __DIE__ signal handler triggers during compilation of an eval string depends on the selection of the errors it contains. Certain types of compilation error are considered "deferred errors" and will not terminate compilation immediately, for instance undeclared variables do not confuse the compiler so they do not trigger immediate termination, and we will report them without limit provided they are the only errors encountered. Whether a given error terminates compilation or not or uses the error count to decide to do so seems to be somewhat random, and it is quite possible that compilation can complete, with errors, without ever "throwing" the exception so it can be passed to the __DIE__ handler. This patch ensures that when the eval has failed due to errors the $SIG{__DIE__} handler is invoked before the eval completes. Commit: d060070bb3bf3d9d9543aa970da00b969d1478d8 https://github.com/Perl/perl5/commit/d060070bb3bf3d9d9543aa970da00b969d1478d8 Author: Yves Orton <demer...@gmail.com> Date: 2022-10-18 (Tue, 18 Oct 2022) Changed paths: M perl.h M perly.c M pp_ctl.c M t/op/eval.t M t/op/signatures.t M t/uni/parser.t M toke.c Log Message: ----------- perl.h, pp_ctl.c - switch to standard way of terminating compilation I did not fully understand the use of yyquit() when I implemented the SYNTAX_ERROR related stuff. It is not needed, and switching to this makes eval compile error messages more consistent. Commit: be13138f205b49afbd86beab816c6d01fbeab972 https://github.com/Perl/perl5/commit/be13138f205b49afbd86beab816c6d01fbeab972 Author: Yves Orton <demer...@gmail.com> Date: 2022-10-18 (Tue, 18 Oct 2022) Changed paths: M embed.fnc M pp_ctl.c M proto.h M t/lib/feature/bundle M t/lib/strict/vars M toke.c Log Message: ----------- pp_ctl.c - Consistently exit after 10 errors Currently we only check the error count when we report an error via yyerror(), even though we say we will stop processing after 10 errors. Errors reported directly to qerror() bypass the check. This fixes this so that we check the number of errors reported in qerror() itself. We also change qerror() so that qerror(NULL) triggers the exception, this way we can move the logic out of yyerror and into qerror(). Compare: https://github.com/Perl/perl5/compare/70ceb1258209...be13138f205b